royale-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Declarations Objects not defined on initComplete
Date Mon, 07 May 2018 05:29:48 GMT
Hi Doug,

I think it has been solved, so I need to see some source MXML and the JS output to understand
why it isn't working for you.  We want to make some parts of the lifecycle similar enough
to not require major refactoring of code.

Thanks,
-Alex

´╗┐On 5/6/18, 8:29 PM, "doug777" <doug777twn@gmail.com> wrote:

    Hi Alex,
    
    In the children of Main (the Views), Declarations are not instantiated
    before the rest of the page, so they are all undefined when required. (The
    problem is fixed in Main itself - the items in its Declarations are all
    defined correctly.)
    
    In the meantime I have been clearing up all the other undefined variables
    errors.
    
    As far as I can see what happens when you run a js project in the browser is
    first a kind of build process takes place that finds all the variables in
    each mxml file and then steps through init() (if there is one) for each
    child and follows the code in there. This phase if it occurred in a flex swf
    project was completely transparent so I never knew it existed.
    
    But there is a big problem with this. If the project uses asynchronous
    processes such as remoteObject, all the variables that depend on the results
    of these are undefined, since the build process punches blindly through the
    code without waiting for anything. It was not previously a problem as this
    code was apparently never reached until after the resultHandler event
    occurred. They're not difficult to fix, it's just finding them all that
    takes a long time, but all done now.
    
    Do you think the Declarations in children problem can be resolved or it
    would be better for me to define these objects another way?
    
    Doug
    
    
    
    --
    Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C1470c6acd6a043644a4f08d5b3caac09%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636612605413971278&sdata=NYJh9P%2FgN4Y8IO6BPK49TmrQk2Xo5cDbCg3mhrD34v0%3D&reserved=0
    

Mime
View raw message