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" <[email protected]> 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
