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" <doug777...@gmail.com> 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 <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