creationComplete is when the componentis
fully created. Initialize is a little earlier in the cycle (componentcreated
by not really measured and laid out). When in doubt I say use
creationComplete. Often it doesn’t matter, but since creationComplete
comes later you can feel more confident that everything you might rely on
exists.
Matt
From: Robert Moss
[mailto:[EMAIL PROTECTED]
Sent: Monday, February 14, 2005
2:57 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders]
Cairngorm Commands finish loading: initialize Vs. creationComplete
I had the same question. I substituted creationComplete for
initialize
and everything seemed to work just fine.
Can anyone give pros and cons to when you should
use creationComplete
versus initialize? I noticed that you use
creationComplete when working
with central applications. I read the ASdocs
for mx.core UIObject but
it doesn't give when to use one or the otherand I
guess I'm not smart
enough or experienced enough to extrapolate.
Thanks,
Robert
>>> [EMAIL PROTECTED] 02/04 4:58 PM
>>>
Has anyone else seemed to have a need for the
Cairngorm framework to
fire an event when the commands are finishedbeing
added to the
FrontController?
My issue is that the EventBroadcaster cannot
broadcast an event if it
has not been added yet. So if I use the
initialize event in my main
mxml file to call a function that broadcastsan
event it will not work
because it may not have been added yet.
At this time I have added
"_root.commandsHaveBeenRegistered();" at the
end of my Control.as file after the commandshave been
added. It kind
of acts like the onLoad event in the body tag in
HTML.
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 the
Yahoo! Terms of Service.
|