Re: [flexcoders] Force initialization of ViewStack children?

2005-09-28 Thread JesterXL





Make the ViewStac's 
creationPolicy="all".

- Original Message - 
From: Noah 
Hoffman 
To: flexcoders@yahoogroups.com 
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Force initialization of ViewStack children?

2005-09-28 Thread Gordon Smith










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 





To: flexcoders@yahoogroups.com






Sent: Tuesday, September
27, 2005 8:20 PM





Subject: [flexcoders] Force
initialization of ViewStack children?











Ive got a component thats 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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Force initialization of ViewStack children?

2005-09-28 Thread Noah Hoffman










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: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Gordon Smith
Sent: Wednesday, September 28,
2005 9:42 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Force
initialization of ViewStack children?





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 





To: flexcoders@yahoogroups.com






Sent: Tuesday, September
27, 2005 8:20 PM





Subject: [flexcoders] Force
initialization of ViewStack children?











Ive got a component thats 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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Force initialization of ViewStack children?

2005-09-28 Thread Gordon Smith










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: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Noah Hoffman
Sent: Wednesday, September 28,
2005 9:47 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Force
initialization of ViewStack children?





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: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Gordon Smith
Sent: Wednesday, September 28,
2005 9:42 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Force initialization
of ViewStack children?





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 





To: flexcoders@yahoogroups.com






Sent: Tuesday, September
27, 2005 8:20 PM





Subject: [flexcoders] Force
initialization of ViewStack children?











Ive got a component thats 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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.