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: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Wednesday, September 28, 2005 6:26 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Force initialization of ViewStack children?

 

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




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to