The silent error:Config.load function problem
  • tamttamt July 2011

    when run "xjsfl.reload()" and got an silent error in output panel of Flash IDE. I found this error is from "core/jsfl/libraries/config.jsfl".

    After adding "try...catch..." and output the error. Here it is:

    ReferenceError: File is not defined

     

  • DaveDave July 2011

    Ah, sorry - as this is still pre-beta, I still have test code in the library files, but it shouldn't run during a reload() as the framework knows it's reloading.

    If you go to the bottom of config.jsfl and change any lines that say if(1) to if(0) does that solve it?

    On a side note - sorry you're getting so many errors!

     

  • tamttamt July 2011

    Not "if(1)" lines found in config.jsfl

    It's OK, you do a great work, I am glad to help.

  • DaveDave July 2011

    OK, like I said in the other post, grab me on Skype and we'll sort this. I think the problems are related, and the only way we're going to sort it out is interactively.

  • DaveDave July 2011

    OK folks, this one was resolved by myself and Tamt on Skype, and it was a right bugger to work out.

    The breakthrough came after saving one of the problem files to a new, blank file and saving it, and then it worked. The difference was that xJSFL's default file-encoding is UTF-8, but Tamt's was GBK, which is an Asian encoding.

    As I'm certainly no expert on encodings, can anyone else shed any light on this?

    It would be a bit awkward for Asian users to have to manually change the encoding on each file (in Komodo, you go Edit > Current File Settings > Encoding) so does anyone know if using the BOM (byte-order mark) would solve this?

     

  • tamttamt July 2011

    Hi, I think adding the "BOM" will solve the problem.

    Check out komodo's document: http://docs.activestate.com/komodo/5.1/prefs.html and look at the "Internationalization Preferences" part.

    By defautl, the IDE will detect the file's "BOM" signature to determine which encoding the file is, if detect failure, the IDE will read the file in system's default encoding(in Chinese operating system, it may be GBK), this may cause the IDE parse the file wrongly, and ofcourse it won't be run correctly.


    We don't how Flash IDE read jsfl file's encoding, but I think it may just like the komodo.

  • DaveDave July 2011

    Did you convert all your files to UTF-8 + BOM, and did they work?

    If so, I'll update the core files with BOMs and push to GitHub next time I have an update ready.

  • tamttamt August 2011

    Yes, Dave, after converting all JSFL files to UTF-8 + BOM, they works fine.

  • DaveDave August 2011

    Ah sweet! Thanks for the update Tamt :)

  • DaveDave August 2011

    OK, latest push contains a load of bug-fixes as well as converting all core and module files to UTF-8 + BOM

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID Sign In with Google Sign In with Twitter

Sign In Apply for Membership

Tagged