[flexcoders] Re: force to preload UI children

2007-01-24 Thread ecpmaz
Thank you both for the solution !

-- 
Maz
 Hey Mathieu,
 
 I'm still learning, but my understanding is that this is what the
 creationPolicy is for.  The container has deferred instantiation to
 reduce the upfront load... take a look here:
 
 http://www.adobe.com/devnet/flex/articles/client_perf_06.html
 
 Good luck,
 
 Chad





Re: [flexcoders] Re: force to preload UI children

2007-01-24 Thread greg h

Hi Maz,

I am posting this as a follow-on to Tracy and Chad's posts.  My goal is to
encourage you to explore alternatives to setting creationPolicy=All.

I think that in the Flex 2 docs, Adobe could do a better job of stating
front-and-center why deferred creation is the default, lay out the
alternatives and detail how to implement them.  fyi ... The alternatives are
intermediate level topics, but ultimately are important to learn.

Following is a link into an earlier thread on this topic by Gordon, the
Flex framework engineer who designed and implemented the deferred
instantiation feature:
http://tech.groups.yahoo.com/group/flexcoders/message/54397

Regrettably, setting creationPolicy=All is the switch that turns off
deferred creation.  Generally, you are advised against doing this except in
small, odd out applications in Flex.

What admonition there is in the Flex 2 docs against using
creationPolicy=All is buried pretty deep.  In the Flex 2 docs, you can
find the following excerpt at this link:
http://livedocs.macromedia.com/flex/201/langref/mx/core/ContainerCreationPolicy.html#ALL

ContainerCreationPolicy
Constant detail
ALL  constant
Avoid using this creationPolicy because it increases the startup time of
your application. There is usually no good reason to create components at
startup which the user cannot see. If you are using this policy so that you
can push data into hidden components at startup, you should instead design
your application so that the data is stored in data variables and components
which are created later pull in this data, via databinding or an
initialize handler.

On the other thread, I had joked that the following chapter should be
required reading before setting creationPolicy=All  :-)

BOOK:  Building and Deploying Flex 2 Applications
CHAPTER 6: Improving Startup Performance
http://livedocs.macromedia.com/flex/201/html/part7_build_deploy_112_1.html

This chapter includes sections on:
About startup 
orderhttp://livedocs.macromedia.com/flex/2/docs/1425.html#155731
Using deferred 
creationhttp://livedocs.macromedia.com/flex/2/docs/1427.html#131502
Creating deferred
componentshttp://livedocs.macromedia.com/flex/2/docs/1431.html#181237

fwiw ... I found that when I started to use Cairngorm in my Flex 2
development, the temptation to use creationPolicy=All went away altogether
:-)

Happy Flexing,

g


[flexcoders] Re: force to preload UI children

2007-01-23 Thread Chad

Hey Mathieu,

I'm still learning, but my understanding is that this is what the
creationPolicy is for.  The container has deferred instantiation to
reduce the upfront load... take a look here:

http://www.adobe.com/devnet/flex/articles/client_perf_06.html

Good luck,

Chad