If you need this thing to be done right at
startup you can consider a static method like we’ve recommended in the
past to make a faceless object an event dispatcher. <mx:Script> public static var foo:String; static function initGlobal():Boolean { foo = someValue; return true; } private static staticsInited : Boolean =
initGlobal(); </mx:Script> Now you can refer to this property as
MyApplication.foo (note MyApplication is the name of your MXML file). You can also just use a singleton
somewhere to hold onto your globals, not everything has to hang off of
Application.application. Matt From: The behavior is
apparently by default.. On 7/20/05, JesterXL
<[EMAIL PROTECTED]>
wrote: Is their creationPolicy not set to "all"? ----- Original Message ----- From: Clint
Modien Sent: Wednesday, July
20, 2005 10:12 AM Subject: Re: [flexcoders]
initializing global variables Ya i did try to use the
initialize handler... but apparently it get's called "after" the
initialize handler of my grandchild. On 7/20/05, Sauro,
Nick <[EMAIL PROTECTED]>
wrote: Well, your parent won't be fully created
until its children are, since the children are its data members, so how can the
parent be 'completed', w/o its data/members/children being completed first? As for your global vars, have you tried
using the initialize handler? Nick
Sauro + R O U N D A R C H + bus 212.909.2335 + mob 914.882.3687 From: flexcoders@yahoogroups.com
[mailto:
flexcoders@yahoogroups.com] On Behalf Of Clint
Modien OK so umm... -- YAHOO!
GROUPS LINKS
YAHOO!
GROUPS LINKS
|
- Re: [flexcoders] initializing global variables Clint Modien
- Re: [flexcoders] initializing global variables JesterXL
- RE: [flexcoders] initializing global variables Matt Chotin
- Re: [flexcoders] initializing global variables Clint Modien