RE: [flexcoders] Don't understand how to use deferred instantiation

2009-09-14 Thread Jake Churchill
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



Re: [flexcoders] Don't understand how to use deferred instantiation

2009-09-14 Thread Wesley Acheson
http://livedocs.adobe.com/flex/3/html/help.html?content=layoutperformance_05.html

Have you tried setting the creation policy?  Jake It says on the above page
that viewStack defers child creation by default.

Regards,

Wesley Acheson

On Mon, Sep 14, 2009 at 9:17 PM, Jake Churchill j...@cfwebtools.com wrote:



  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
 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


 



RE: [flexcoders] Don't understand how to use deferred instantiation

2009-09-14 Thread Alex Harui
By default, Viewstack creates all of its children, but those children do not 
create their children unless they are the selectedChild.  You can hook up to 
the creationComplete of one of those grandchildren.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

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



http://livedocs.adobe.com/flex/3/html/help.html?content=layoutperformance_05.html

Have you tried setting the creation policy?  Jake It says on the above page 
that viewStack defers child creation by default.

Regards,

Wesley Acheson
On Mon, Sep 14, 2009 at 9:17 PM, Jake Churchill 
j...@cfwebtools.commailto:j...@cfwebtools.com wrote:


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
402-408-3733 x103

From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of biosmonkey
Sent: Monday, September 14, 2009 1:49 PM
To: flexcoders@yahoogroups.commailto: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.comhttp://www.avg.com
Version: 8.5.409 / Virus Database: 270.13.96/2369 - Release Date: 09/14/09 
05:51:00





RE: [flexcoders] Don't understand how to use deferred instantiation

2009-09-14 Thread Jake Churchill
Yeah, I always forget that you can change this.  I think I meant the other
way around.  ViewStacks wait on everything, but other components (like
Navigators) load everything up front.  I think some of them extend the
ViewStack don't they?  Anyway, good information.  Thanks for pointing out my
backwards logic J

 

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 Wesley Acheson
Sent: Monday, September 14, 2009 3:23 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Don't understand how to use deferred instantiation

 

  

http://livedocs.adobe.com/flex/3/html/help.html?content=layoutperformance_05
.html

Have you tried setting the creation policy?  Jake It says on the above page
that viewStack defers child creation by default.

Regards,

Wesley Acheson

On Mon, Sep 14, 2009 at 9:17 PM, Jake Churchill j...@cfwebtools.com wrote:

 

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

 

 



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



Re: [flexcoders] Don't understand how to use deferred instantiation

2009-09-14 Thread Jeffry Houser


That's not true.  It only loads everything when the app loads if 
creationPolicy is set to all . ( 
http://livedocs.adobe.com/flex/3/langref/mx/core/Container.html#creationPolicy 
).


I suggest that the original poster check the creationPolicy for his 
viewStack.  If none is set, move up the component chain to the main 
application file.  Most likely someone somewhere set it to All ( 
|ContainerCreationPolicy.ALL ).  |


Jake Churchill wrote:
 

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





--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust