Yes, a viewstack loads everything when the app loads.  If you don't want
that, I think you need to use states instead

 

Jake Churchill
CF Webtools
11204 Davenport, Ste. 100
Omaha, NE  68154
 <http://www.cfwebtools.com> http://www.cfwebtools.com
402-408-3733 x103

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of biosmonkey
Sent: Monday, September 14, 2009 1:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Don't understand how to use deferred instantiation

 

  

I am having trouble understanding how to use deferred instantiation.

I have a project with a viewstack, and the viewstack has a lot of canvas
containers for different "pages" that are activated according to user
selection on a menubar. Each "page" inside the canvas is actually one or two
components.

The problem is that each of these components has some custom code attached
to the creationComplete event that loads external string files. What I am
seeing is that all containers and the components are initializing when the
application loads, and all string files are being loaded, regardless of the
current viewstack view. This is creating a serious performance problem.

To test the child controls, I added some alerts inside the "page" components
as well (such as a label) that are attached to creationComplete and
addedToStage. Both events are firing when the app loads, for all viewstack
containers.

I don't understand this. What exactly is being deferred?

Do all components/child components/controls go through the initialization
process and fire creationComplete, regardless of whether they are visible?

Can someone please enlighten me on how to use this correctly?



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.96/2369 - Release Date: 09/14/09
05:51:00

Reply via email to