Open a Flash document (FLA) before running this script.
  • ThaNarieThaNarie July 2011

    After updating and installing, I got the following error opening Flash (as an error popup and in the output panel):

    > xjsfl: loading "xJSFL/core/jsfl/libraries/validate.jsfl"
    > xjsfl: loading "xJSFL/modules/Snippets/jsfl/Snippets.jsfl"
    The following JavaScript error(s) occurred:

    Open a Flash document (FLA) before running this script.
    > xjsfl: setting environment variables...
    > xjsfl: running user bootstrap...
    > xjsfl: ready!
  • DaveDave July 2011

    OK, this means there's probbaly an error occuring in Snippets. Flash reports a document not being open if there's a JSFL error when you've no document. Little bug to note for future reference there!

    Make a new document, then create a new temp.jsfl file in Komodo, save somewhere like user/jsfl/temp/temp.jsfl and put this code in:

    xjsfl.reload();

    Then run it from Komodo using CTRL+Enter.

    Let me know what the new error message (there should be one) that comes up is.

  • ThaNarieThaNarie July 2011

    No error when running the reload with an empty document open:

    > xjsfl: loading "xJSFL/core/jsfl/libraries/validate.jsfl"
    > xjsfl: loading "xJSFL/modules/Snippets/jsfl/Snippets.jsfl"
    The following JavaScript error(s) occurred:

    > xjsfl: setting environment variables...
    > xjsfl: running user bootstrap...
    > xjsfl: ready!

  • DaveDave July 2011

    Nope, there's a silent error there. Something fruity must be going on in Snippets.

    If you open modules/Snippets/jsfl/snippets.jsfl in Komodo Edit, then run that, it should display the error.

    You'll need to add this line to the very top of snippets.jsfl to initialize it with the main framework code first:

    xjsfl.init(this);

    Sorry it's a bit "get your hands dirty"... that's the way it is with not being able to properly debug runScript().

  • ThaNarieThaNarie July 2011

    Aah, that's a better way to find the error :)
    I already tracked down the error by adding traces everywhere, and found out:

    snippets.jsfl:

            init:function()
            {
                var set = this.getCurrentSet();
            getCurrentSet:function()
            {
                // grab current set
                    var sets    = this.settings.get('sets');

    config.jsfl  

                get:function(path)
                {
                    fl.trace('settings.get(' + path + ')')
                    fl.trace('this.xml : ' + this.xml);

                    return eval('this.xml.' + path);
                },

    Output:

    settings.get(sets)
    this.xml : <settings>
      <user>
        <author>Dave Stewart</author>
        <url>www.xjsfl.com</url>
      </user>
      <panel>
        <root/>
      </panel>
      <icons default="0">
        <icon>Filesystem/page/page_white.png</icon>
        <icon>Filesystem/file/file_code_red.png</icon>
      </icons>
    </settings>

    It looks like the xml doesn't have a 'set' node?

     

  • DaveDave July 2011

    Don't bother adding traces, much easier and more effective to do the following:

    try{
    // code
    }
    catch(err){
    xjsfl.output.debug(err);
    }

    Just wrap the first error, and you'll see the error stack right down to the problem.

    That looks like it's the old user settings file. Just delete user/config/settings/snippets.xml and it should all run OK.

    So, yeah, maybe a fresh install was a better idea!

    xJSFL copies Kohana's cascading file system, so you can have a default settings file with the module, but override it with your own settings file in your user folder. Having the old one left over from the previous install was overriding the correct one.

    Good spot :)

  • ThaNarieThaNarie July 2011

    Allright, the errors are gone :)

  • DaveDave July 2011

    Great! Thanks for letting me know.

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