OK, but that still isn't optimal. Why
initialize a control at startup that the user can't see until she navigates?
Did my suggestions not work, or do you simply prefer to write all
initialization code on the top level tag (i.e., <Application>)? - Gordon From: The creationPolicy all method indeed
resulted in extremely slow startup time. In the end, in the
initialize method of the <Application> I explicitly called
createComponent(0, true) on the parent of the component I wanted to force
initialization on and it works like a charm. Thanks for the help. From: That's the brute force way. It causes all
controls in all panes of the ViewStack to get created at startup, and so will
cause your app to start up slower. A better way is to initialize the control
would be in the childrenCreationComplete event on the pane of the ViewStack
where it lives. That event is dispatched when the user navigates to that pane,
after the controls on it have undergone deferred instantiation. You could also try simply writing a
creationComplete handler for the control itself. - Gordon From: Make the ViewStac's creationPolicy="all". ----- Original Message ----- From: Noah
Hoffman Sent: Tuesday, September
27, 2005 8:20 PM Subject: [flexcoders] Force
initialization of ViewStack children? I’ve got a component that’s not the first
component my View Stack and I need it to initialize on launch. Does
anyone know how to force this? Thanks, Noah
|