Re: Declarations Objects not defined on initComplete

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
Hi Doug,

The JS output for RoyaleStore's ProductSupport.mxml, for example, looks like it should have set up the declarations before initComplete.  Is this also failing in js-debug version or just js-release?  If js-debug, can you file a Github Issue with the .mxml and .js output?  Or if you don't want to make it public, you can send it to me off-list.

Thanks,
-Alex

On 4/25/18, 8:36 PM, "doug777" <[hidden email]> wrote:

    In our Spark project we defined in fx:Declarations some DisplayObjects,
    Effects, Images and Formatters that were not going to be displayed or used
    immediately.
   
    Some further settings were then applied after initComplete.
   
    But in Royale JS only, these declarations are still not defined after
    initComplete.
   
    How are fx:Declarations objects handled in JS?
   
    Should they be defined at the time initComplete is called or not?
   
    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%7C2d67757911a046d8130708d5ab26f17b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636603106145215723&sdata=mRoU2L6h7ENHa4oAviYbN67TquDkb33i8AFryfRzTAs%3D&reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
Hi Alex,

Okay thanks for that. Then since it should appear let me study my code for a
bit longer and compare it with ProductSupport in RoyaleStore example. I'll
come back if I can't find a solution.

Thanks,
Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
Running (in Moonshine 1.11) Build as JavaScript on RoyaleStore results in
this error:

SEVERE:
~/Moonshine/RoyaleStore/bin/js-debug/productsView/ProductCatalogPanelTitleBarView.js:18:
ERROR - required "productsView.CatalogTitleButtons" namespace not provided
yet
: goog.require('productsView.CatalogTitleButtons');

The project also uses a ButtonBarButtonSkin in beige.css and blue.css but I
suppose these styles will just be ignored in JS.

I can't see what is causing the error. The relevant namespace appears to be
correctly defined and all the files are present. Can anyone suggest a quick
fix?

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
Hi Doug,

The Ant build look like it uses the option -js-output-optimization=skipFunctionCoercions

See if that is set in your Moonshine project.  If that doesn't help, make sure -remove-circulars is being used.

HTH,
-Alex

On 4/26/18, 7:11 PM, "doug777" <[hidden email]> wrote:

    Running (in Moonshine 1.11) Build as JavaScript on RoyaleStore results in
    this error:
   
    SEVERE:
    ~/Moonshine/RoyaleStore/bin/js-debug/productsView/ProductCatalogPanelTitleBarView.js:18:
    ERROR - required "productsView.CatalogTitleButtons" namespace not provided
    yet
    : goog.require('productsView.CatalogTitleButtons');
   
    The project also uses a ButtonBarButtonSkin in beige.css and blue.css but I
    suppose these styles will just be ignored in JS.
   
    I can't see what is causing the error. The relevant namespace appears to be
    correctly defined and all the files are present. Can anyone suggest a quick
    fix?
   
    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%7C4e7675208d56476e061608d5abe4281f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636603918907269119&sdata=ha%2FBuE%2FrvCgoMuaAY2KxagUsuqmiW2ekr2F2jIrIoAk%3D&reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
Hi Alex,

Yes that solved the problem.

So now I can see that the items in the Declarations of ProductSupport are
properly defined.

The only difference I can see between this and my project is that in
RoyaleStore this effect is not used until the user clicks a button whereas
mine have to be defined right at the beginning when initComplete is
triggered. So I'm trying to find a way to defer calling them until much
later to see if this makes any difference.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
Can you attach the js to a github issue?  I want to see if the data looks reasonable.  Can we assume no errors in the console?


From: doug777 <[hidden email]>
Sent: Thursday, April 26, 2018 8:04:11 PM
To: [hidden email]
Subject: Re: Declarations Objects not defined on initComplete
 
Hi Alex,

Yes that solved the problem.

So now I can see that the items in the Declarations of ProductSupport are
properly defined.

The only difference I can see between this and my project is that in
RoyaleStore this effect is not used until the user clicks a button whereas
mine have to be defined right at the beginning when initComplete is
triggered. So I'm trying to find a way to defer calling them until much
later to see if this makes any difference.

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%7C9a5295c4ec074a0215d208d5abeb8fd3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636603950657119867&sdata=OtryjSnenGyXulzrybDsgo5iV2tXc8iowR%2FDlUfMKL4%3D&reserved=0
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
Hi Alex,

I am still trying to work out what is happening, but I'm almost certain the
problem is nothing to do with any problem with fx:Declarations.

Instead the problem occurs because the order in which JS builds things is
totally different than Flex Spark/MX.

I have not changed the basic structure of the old project, only converted
items from old Flex to something that is available in JS.

So the structure of Main.mxml is something like this :

js:Application .... applicationComplete="init()"
    fx:Declarations
    fx:Style
    js:beads
    js:valuesImpl
   
    js:initialView
    js:View
        <js:VContainer
            !--Header--
            js:HContainer
           
            !--Body--
            js:Container
                View1
                View2
                ....
                View13

            !--Footer--
            js:Container

    fx:Script
        ....
        function init()
        etc.

The problem is not that init is not being called by applicationComplete, the
problem is that it looks like the entirety of the Views in the Body are set
up before Main.init() is called.

The first failure is on an &lt;b>actionScript line* in a support class used
by all the Views, but stepping through the debugger it occurs immediately
after View2.mxml is added as a Child (even though it is also used in Main
and View1). It fails because the line is looking for something that is set
up in Main.init(). But Main.init() has still not been called.

This support class is not mentioned in any of the mxml as far as I can see,
so I can't understand why it is being looked at at this point in the process
unless there is no connection between the order items appear in the debugger
and various threads are running and appear out of sequence.

If this is true then the first time this support class is called is in the
result handler of a RemoteObject defined in js:Beads in Main.mxml.

It looks as though the structure of a JS project has to be very different
than a Flex project but I cannot immediately see how to get the project to
build in a logical order if even the actionScript lines are built before
applicationComplete is called.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
Hi Doug,

Ideally, the order of execution would be mostly the same.  Can we dig deeper and figure this out?  For sure, Royale isn't using the invalidation/validation mechanism that Flex did.  That's on purpose because some changes to DOM objects in the browser result in immediate updates.  There is no guaranteed deferred rendering like in Flash.

Were you relying on Flex navigators and deferred instantiation?

If you put a breakpoint on the code that is failing, what does the call stack look like?

Let us know,
-Alex

On 4/29/18, 7:44 PM, "doug777" <[hidden email]> wrote:

    Hi Alex,
   
    I am still trying to work out what is happening, but I'm almost certain the
    problem is nothing to do with any problem with fx:Declarations.
   
    Instead the problem occurs because the order in which JS builds things is
    totally different than Flex Spark/MX.
   
    I have not changed the basic structure of the old project, only converted
    items from old Flex to something that is available in JS.
   
    So the structure of Main.mxml is something like this :
   
    js:Application .... applicationComplete="init()"
        fx:Declarations
        fx:Style
        js:beads
        js:valuesImpl
       
        js:initialView
        js:View
            <js:VContainer
                !--Header--
                js:HContainer
               
                !--Body--
                js:Container
                    View1
                    View2
                    ....
                    View13
   
                !--Footer--
                js:Container
   
        fx:Script
            ....
            function init()
            etc.
   
    The problem is not that init is not being called by applicationComplete, the
    problem is that it looks like the entirety of the Views in the Body are set
    up before Main.init() is called.
   
    The first failure is on an &lt;b>actionScript line* in a support class used
    by all the Views, but stepping through the debugger it occurs immediately
    after View2.mxml is added as a Child (even though it is also used in Main
    and View1). It fails because the line is looking for something that is set
    up in Main.init(). But Main.init() has still not been called.
   
    This support class is not mentioned in any of the mxml as far as I can see,
    so I can't understand why it is being looked at at this point in the process
    unless there is no connection between the order items appear in the debugger
    and various threads are running and appear out of sequence.
   
    If this is true then the first time this support class is called is in the
    result handler of a RemoteObject defined in js:Beads in Main.mxml.
   
    It looks as though the structure of a JS project has to be very different
    than a Flex project but I cannot immediately see how to get the project to
    build in a logical order if even the actionScript lines are built before
    applicationComplete is called.
   
    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%7C1bdb50ae49944f62933608d5ae4449ed%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636606530686057646&sdata=p3VEaZt58cKVUiBZ1OHmPQ%2FszcPjMka5uhxZhOcqH9E%3D&reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
The old Flex project used a ViewStack (and Spark Navigator) for the Body
Views. I have changed this to use visible = false in the mxml and then
switch visible on and off whenever the user wants to change the View.

The call stack is creating the items in the order of the mxml in Main - so
it goes Application... - View... - Container... - Container... - View1... -
View2 - Add View2 as Child and then stops on the actionScript line in this
support class.

But I'm wondering how the javascript interpreter in the browser knows which
was mxml code and which was actionScript. So isn't it quite reasonable that
an actionScript line might get looked at before initComplete is called?

So the question really is how does one get the mxml code to build and then
call initComplete before any of the actionscript is inspected?

Doug





--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
Hi Doug,

Even in Flex, MXML is converted to ActionScript.  The order that code is run has to do with when certain events are dispatched.  Same should be true in the browser, but there are fewer lifecycle events.

Depending on a ViewStack or Spark Navigator's creationPolicy, non-selected views do not go through the full instantiation lifecycle.  In Royale, visible=false just hides something, but it still goes through and calls its initComplete.   Is that what is running your code too soon?  I'm trying to understand how View2 calls the actionscript support class in both the Flex version and the Royale version.

Thanks,
-Alex

On 4/29/18, 9:37 PM, "doug777" <[hidden email]> wrote:

    The old Flex project used a ViewStack (and Spark Navigator) for the Body
    Views. I have changed this to use visible = false in the mxml and then
    switch visible on and off whenever the user wants to change the View.
   
    The call stack is creating the items in the order of the mxml in Main - so
    it goes Application... - View... - Container... - Container... - View1... -
    View2 - Add View2 as Child and then stops on the actionScript line in this
    support class.
   
    But I'm wondering how the javascript interpreter in the browser knows which
    was mxml code and which was actionScript. So isn't it quite reasonable that
    an actionScript line might get looked at before initComplete is called?
   
    So the question really is how does one get the mxml code to build and then
    call initComplete before any of the actionscript is inspected?
   
    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%7C4defe2481d8e41851f9c08d5ae540263%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636606598203970349&sdata=m3uOX4vrVHec%2Fx%2BbbV2dVBY0ZouWVqnO78mKFdtXI0M%3D&reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
Hi Alex,

The as class is a kind of pop-up Alert. In the early parts of the
actionscript code the first thing that happens is a RemoteObject gets called
and the as class pops up a "Getting data" message. This happens in
Main.init() and View2.init().

For some reason the first bit of actionScript to get built is View2.init()
which then builds AlertPopup.as and then fails because Main.init() has not
yet been built.

(View1.init may also have run but the first Alert in here is in a second
function called by View1.init)

When running the code, the Alert in View2.init does not occur until after
the user makes some selections in View1.

I'm wondering if the order code is built would differ between browsers and
processor speeds on different computers so that the order code is built is
more or less random.

Perhaps an answer would be to move all the code from Main and have it appear
in a View0 whose init would then hopefully be built before View2. It looks
as though applicationComplete is not called in JS until all the Views have
been completely built whereas in Flex initComplete was called after the
display objects were built.

Doug







--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
Hi Doug,

Can you give me a better idea of what the Flex code was?  I'm wondering if the Flex code hooked an event like creationComplete that was sent top-down (parent then its children).  In Royale, initComplete is sent bottom-up (children then parent).   There is no top-down event in Royale at this time.  We could create a bead that generates one, but I don't know if we want to bake it into the framework until we get more data.  TBH, I never really thought about until now, but creationComplete in Flex is called way after creation is complete for deeply nested children since it is top-down.

Code order will probably not change between browsers.  We are not creating threads at this time.

So, don't move your code.  If you need a top-down event, generate one and hook to it.  Like a CreationCompleteBead.  It might hook to applicationComplete and walk the containers top-down and dispatch "creationComplete"  If you create a bead that does it, it would be great if you would submit to the project.  We would use it in the emulation components.

Thanks,
-Alex

On 4/29/18, 11:51 PM, "doug777" <[hidden email]> wrote:

    Hi Alex,
   
    The as class is a kind of pop-up Alert. In the early parts of the
    actionscript code the first thing that happens is a RemoteObject gets called
    and the as class pops up a "Getting data" message. This happens in
    Main.init() and View2.init().
   
    For some reason the first bit of actionScript to get built is View2.init()
    which then builds AlertPopup.as and then fails because Main.init() has not
    yet been built.
   
    (View1.init may also have run but the first Alert in here is in a second
    function called by View1.init)
   
    When running the code, the Alert in View2.init does not occur until after
    the user makes some selections in View1.
   
    I'm wondering if the order code is built would differ between browsers and
    processor speeds on different computers so that the order code is built is
    more or less random.
   
    Perhaps an answer would be to move all the code from Main and have it appear
    in a View0 whose init would then hopefully be built before View2. It looks
    as though applicationComplete is not called in JS until all the Views have
    been completely built whereas in Flex initComplete was called after the
    display objects were built.
   
    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%7Cc2d0e55cb37948cae7a408d5ae66c208%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636606678724389269&sdata=KxfoE849sPjZ3ZaPUYc9zGl2o8R7HxRnrvv%2F%2FfCJiJ0%3D&reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
Hi Alex,

I think I see what the problem is now. It's happening because of the way
I've replaced FlexGlobals.

I have done this by creating a static class with all the global variables,
but this means that instead of the AlertPopup pointing directly to a public
var set by the mxml in Main before the Views are reached by the builder, I
now have to set this static var in Main.init() and then point AlertPopup to
the static class.

Not sure yet how to solve this, but for the moment I can move forward and
come back to this later.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
Hi Alex,

You are right. I need all the stuff in Main.xml : public vars, Declarations
etc. built before the Views start to build otherwise it can't work.

So I'll do as you say and try to devise a top-down bead.

If I have any success I'll let you know and of course I can submit it to the
project.

Thanks for helping me understand the process that's going on here.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
Hi Doug,

OK, looking forward to seeing a top-down bead.

It just occurred to me that fx:Declarations and fx:Script variables should be resolved top-down and before the children are created and applied.  So instead of creating a top-down bead you might be able to run initializer code that sets up whatever you need to set up before the children start running code.

HTH,
-Alex

On 4/30/18, 7:36 PM, "doug777" <[hidden email]> wrote:

    Hi Alex,
   
    You are right. I need all the stuff in Main.xml : public vars, Declarations
    etc. built before the Views start to build otherwise it can't work.
   
    So I'll do as you say and try to devise a top-down bead.
   
    If I have any success I'll let you know and of course I can submit it to the
    project.
   
    Thanks for helping me understand the process that's going on here.
   
    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%7C8ee792480b5e40a5855908d5af0c5252%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607389930382021&sdata=yGTgLGfNi8a%2BqdKrIEJkJ1dnuxKErlGLVYfO002bL3o%3D&reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
Hi Alex,

I was just about to ask how the fx: objects get added. I can't find it in
the Royale code.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
Hi Doug,

In Royale, all MXML tags and attributes are converted into data structures.  From memory, it works like this:

-The top tag is instantiated.
-Attributes in the top tag are applied by MXMLDataInterpreter during constructor time.
-fx:Script variables are initialized.
-top tag is added to display list
-the rest of the data structure is processed by MXMLDataInterpreter as follows
  -Any beads defined in MXML and instantiated and added
  -All other attributes, including fx:Declarations are instantiated and initialized.
  -Children are instantiated and initialized in the same way.

HTH,
-Alex

On 4/30/18, 9:25 PM, "doug777" <[hidden email]> wrote:

    Hi Alex,
   
    I was just about to ask how the fx: objects get added. I can't find it in
    the Royale code.
   
    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%7Cd8acef2b3ac644853c7108d5af1b98ba%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607455484188182&sdata=0nUwRccgmTvHVxBfnarHLUntrony4j1f43brPlsuiZs%3D&reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

doug777
Hi Alex,

Just got back to this.

This is what I think is happening, please correct me if I'm wrong.

    "-The top tag is instantiated.
     -Attributes in the top tag are applied by MXMLDataInterpreter during
constructor time.
     -fx:Script variables are initialized.
     -top tag is added to display list"

Then "-the rest of the data structure is processed by MXMLDataInterpreter"

But the crucial thing is that the items in initialView are processed first.
So every part of everything in initialView is set up and only then is
applicationComplete called that allows the remainder of Main.mxml to get set
up.

I'm not sure how to make the fx:Declarations in Main get set up first, as by
the time initialization begins, the items in fx:Declarations are already in
the this scope of Application and there doesn't appear to be any way to work
out that originally they were defined in an fx:Declarations tag.

I'm still thinking it might be sufficient to move most of the stuff out of
Main.mxml into a View0 and just leave the Views in initialView and the
replacement for the ViewStack controller in the Script in Main.

Not sure which way to go.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
Hi Doug,

Ah yes,  you are right that the initialView is instantiated at constructor time.  Maybe we should move that to just before adding the initialView to the DOM.

I will experiment with that tomorrow.

Thanks,
-Alex

On 5/2/18, 9:06 PM, "doug777" <[hidden email]> wrote:

    Hi Alex,
   
    Just got back to this.
   
    This is what I think is happening, please correct me if I'm wrong.
   
        "-The top tag is instantiated.
         -Attributes in the top tag are applied by MXMLDataInterpreter during
    constructor time.
         -fx:Script variables are initialized.
         -top tag is added to display list"
   
    Then "-the rest of the data structure is processed by MXMLDataInterpreter"
   
    But the crucial thing is that the items in initialView are processed first.
    So every part of everything in initialView is set up and only then is
    applicationComplete called that allows the remainder of Main.mxml to get set
    up.
   
    I'm not sure how to make the fx:Declarations in Main get set up first, as by
    the time initialization begins, the items in fx:Declarations are already in
    the this scope of Application and there doesn't appear to be any way to work
    out that originally they were defined in an fx:Declarations tag.
   
    I'm still thinking it might be sufficient to move most of the stuff out of
    Main.mxml into a View0 and just leave the Views in initialView and the
    replacement for the ViewStack controller in the Script in Main.
   
    Not sure which way to go.
   
    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%7C69beedd92cb04e9b065a08d5b0ab4749%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636609172038166080&sdata=%2BQbeDhLP3073T%2FPVAJsEG1ZmofvZgkctnpT%2F1v2Kizk%3D&reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Declarations Objects not defined on initComplete

Alex Harui-2
In reply to this post by doug777
Hi Doug,

I tweaked Application to alter the order in which the initialView gets initialized.  I first tried changing the compiler to see initialView like the children of other MXML top tags, but we don't want to require that the application is a UI widget and the initialView thus can't be seen as specifying a set of children so it was going to be too much work to move the initialView data to the data structure for the child widgets.  Instead, initialView is still processed at constructor time, but Application ensures it is last of all properties.  The fx:Declarations and other properties should be initialized first.

The implementation scans the array for the initialView property.  I don't really like doing that, but I just want to try this to see if it fixes your problem and see what breaks before changing the compiler to output the array differently.

It should be in the nightly build in an hour or so.

HTH,
-Alex

On 5/2/18, 9:06 PM, "doug777" <[hidden email]> wrote:

    Hi Alex,
   
    Just got back to this.
   
    This is what I think is happening, please correct me if I'm wrong.
   
        "-The top tag is instantiated.
         -Attributes in the top tag are applied by MXMLDataInterpreter during
    constructor time.
         -fx:Script variables are initialized.
         -top tag is added to display list"
   
    Then "-the rest of the data structure is processed by MXMLDataInterpreter"
   
    But the crucial thing is that the items in initialView are processed first.
    So every part of everything in initialView is set up and only then is
    applicationComplete called that allows the remainder of Main.mxml to get set
    up.
   
    I'm not sure how to make the fx:Declarations in Main get set up first, as by
    the time initialization begins, the items in fx:Declarations are already in
    the this scope of Application and there doesn't appear to be any way to work
    out that originally they were defined in an fx:Declarations tag.
   
    I'm still thinking it might be sufficient to move most of the stuff out of
    Main.mxml into a View0 and just leave the Views in initialView and the
    replacement for the ViewStack controller in the Script in Main.
   
    Not sure which way to go.
   
    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%7C69beedd92cb04e9b065a08d5b0ab4749%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636609172038166080&sdata=%2BQbeDhLP3073T%2FPVAJsEG1ZmofvZgkctnpT%2F1v2Kizk%3D&reserved=0
   

12