One of the ViewStack's coolest features is its ability to create your 
content on the fly, as it's needed.  By setting the creationPolicy to "auto" 
(or leaving it to it's default), it only creates the children within it when 
the user actually navigates there.  From the docs: "This setting causes a 
delay in application startup time, but results in quicker response time for 
user navigation."

This poses a conundrum with me, though.  By setting it to "all", I take an 
initial hit in the beginning, I can add event listeners to all of my views, 
and they are immediately available.  But, this defeats the whole purpose if 
you have a bunch of intense views.

By setting it to "auto" (default), my initialize never gets called, and I 
have to use childrenCreated instead. At this point, it's a author time 
decesion to make... frankly, it feels good to use initialize everywhere, so 
I've never been comfortable using auto.

I agree with Manish; create them dynamically.

----- Original Message ----- 
From: "Manish Jethani" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, March 21, 2005 3:31 AM
Subject: Re: [flexcoders] creationPolicy vs load/unload?



On Mon, 21 Mar 2005 16:48:51 +1000, Scott Barnes <[EMAIL PROTECTED]> 
wrote:

> In terms of using typical default creationPolicy to load say screens
> within a viewstack is it more of a performance hit to do it via this
> way or would it be better suited to load/unload mxml swfs into your
> application as needed.

If the requirement is to load and unload views as and when they are
needed, I would still go with createChild()/destroyChild() for the
custom MXML/AS component (the view) instead of loading/unloading a
SWF.

Manish



Yahoo! Groups Links








 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to