[haXe] Impossible to send backslash followed by "r" string to Neko from Flash - it gets converted to linebreak character \r

Asger Ottar Alstrup asger at area9.dk
Thu Sep 14 16:20:08 CEST 2006


Hi,

I'm trying to do this in Flash:

  static var cnx : swhx.Connection;
  cnx = swhx.Connection.desktopConnect();
  cnx.Desktop.writeFile.call(["myfile.rtf", "\\rtf"]);

to call a method in Desktop object in Neko world. The relevant Desktop code
is this:

    // write a file, asking for confirmation if it exists in advance
    public static function writeFile( file : String, content: String) {
        // create the file in text mode
        var f = neko.io.File.write(file, false);
        // write the content
        f.writeBytes(content, 0, content.length);
        // close the file
        f.close();
    }

This produces 0x0d character in output, rather than \ followed by r as
expected. It seems that the problem occurs in interface between Flash and
Neko-world, because I can use f.write("\\r") in writeFile and that works
correctly.

Regards,
Asger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20060914/2ba41526/attachment.htm


More information about the Haxe mailing list