Thanks Doug.  I just found that immediately after sending my email.  J

 

What I did is set it to creationPolicy="queued", which seems to get it done
fast enough.

 

I assume the reason it's a bad idea is because it's a performance hit at
start up, especially since that main viewstack is holding 90% of the stuff
of the app, and also because it might instantiate stuff the user never uses?


 

If so, then I think creationPolicy="all" or "queued" will be fine since the
app isn't that big, and is basically just a simple status and config console
app, and will be run over an intranet.

 

Now that I know what I'm looking for, I'll do some searching for possible
negative repercussions of using it.

 

Thanks

 

T

 

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Doug McCune
Sent: Saturday, October 20, 2007 11:39 PM
To: [email protected]
Subject: Re: [flexcoders] nested viewstack does not initialize in time

 

creationPolicy="all"

I'll let someone else reply telling you why that's a bad idea.

On 10/20/07, Thomas Spellman < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

I have a simple navigation interface with a navbar on the left, and a
content section on the right.  The navbar is composed of several main
sections (canvases), each of which has several sub sections (a linkbar bound
to a viewstack).   The content area has a main viewstack with a canvas for
each main section, and each of those has a viewstack that is bound to the
subsection linkbars in the navbar.   

 

The problem is that only the first of the subsection (nested) viewstacks is
initialized at runtime.  When the user clicks on any section other than the
first, that section expands, but is empty, because the linkbar's
dataProvider is still null.  It's only the second time it's selected that
it's displayed.  When the nav section is expanded (which could be 1 minute
after loading), the dataProvider of the linkbar is still null.

 

Is there some way to force it to initialize all of the nested viewstacks?

 

I tried to do this in Application.creationComplete(), but when I iterated
through the main viewstack and attempted to list the child controls of its
canvases (there should be 1 viewstack in each), I got an exception because
they had 0 children at that point.  Any ideas?

 

Here's the app, right-click for source.  To see the problem, try clicking on
a different section twice.  The first time it fails, and the second time it
works normally.

 

http://thosmos.com/develop/mockup/bin/darkroom.html

 

T

 

 

Reply via email to