RE: [flexcoders] initializing global variables
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:[EMAIL PROTECTED] On Behalf Of Clint ModienSent: Wednesday, July 20, 2005 9:53 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] initializing global variables OK so umm... http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htmI'm confused.My grandkids and my kids get initialized before I do? (The application)Uhh... how am I supposed to setup the any global vars in the app?Even the creationCompletes of my grandkids fires before the app does.What's the first event to fire in the Application that I can use to initialize a global var? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
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. Check the link.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 ModienSent: Wednesday, July 20, 2005 9:53 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] initializing global variables OK so umm... http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm I'm confused.My grandkids and my kids get initialized before I do? (The application)Uhh... how am I supposed to setup the any global vars in the app?Even the creationCompletes of my grandkids fires before the app does.What's the first event to fire in the Application that I can use to initialize a global var? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] initializing global variables
Is their creationPolicy not set to "all"? - Original Message - From: Clint Modien To: flexcoders@yahoogroups.com 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.Check the link. 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 ModienSent: Wednesday, July 20, 2005 9:53 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] initializing global variables OK so umm... http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm I'm confused.My grandkids and my kids get initialized before I do? (The application)Uhh... how am I supposed to setup the any global vars in the app?Even the creationCompletes of my grandkids fires before the app does.What's the first event to fire in the Application that I can use to initialize a global var?--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] initializing global variables
The behavior is apparently by default.. http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm On 7/20/05, JesterXL [EMAIL PROTECTED] wrote: Is their creationPolicy not set to all? - Original Message - From: Clint Modien To: flexcoders@yahoogroups.com 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.Check the link. 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 ModienSent: Wednesday, July 20, 2005 9:53 AMTo: flexcoders@yahoogroups.com Subject: [flexcoders] initializing global variables OK so umm... http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm I'm confused.My grandkids and my kids get initialized before I do? (The application)Uhh... how am I supposed to setup the any global vars in the app?Even the creationCompletes of my grandkids fires before the app does.What's the first event to fire in the Application that I can use to initialize a global var?--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] initializing global variables
Yeah, that's what you want; you want your Application to be initialized after everyone in it is done. As far as global vars, "Singleton is the new _global." As such, if you define them in a Singleton class, all children will have access to them immediately. If you want them as member vars of Application.mxml, yeah, that won't work. - Original Message - From: Clint Modien To: flexcoders@yahoogroups.com Sent: Wednesday, July 20, 2005 10:58 AM Subject: Re: [flexcoders] initializing global variables The behavior is apparently by default..http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm On 7/20/05, JesterXL [EMAIL PROTECTED] wrote: Is their creationPolicy not set to "all"? - Original Message - From: Clint Modien To: flexcoders@yahoogroups.com 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.Check the link. 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 ModienSent: Wednesday, July 20, 2005 9:53 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] initializing global variables OK so umm... http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm I'm confused.My grandkids and my kids get initialized before I do? (The application)Uhh... how am I supposed to setup the any global vars in the app?Even the creationCompletes of my grandkids fires before the app does.What's the first event to fire in the Application that I can use to initialize a global var?--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] initializing global variables
If you need this thing to be done right at startup you can consider a static method like weve 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: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Clint Modien Sent: Wednesday, July 20, 2005 7:58 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] initializing global variables The behavior is apparently by default.. http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm On 7/20/05, JesterXL [EMAIL PROTECTED] wrote: Is their creationPolicy not set to all? - Original Message - From: Clint Modien To: flexcoders@yahoogroups.com 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. Check the link. 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 Sent: Wednesday, July 20, 2005 9:53 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] initializing global variables OK so umm... http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm I'm confused. My grandkids and my kids get initialized before I do? (The application) Uhh... how am I supposed to setup the any global vars in the app? Even the creationCompletes of my grandkids fires before the app does. What's the first event to fire in the Application that I can use to initialize a global var? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] initializing global variables
Fantastic... thanks Matt. On 7/20/05, Matt Chotin [EMAIL PROTECTED] wrote: 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: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Clint Modien Sent: Wednesday, July 20, 2005 7:58 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] initializing global variables The behavior is apparently by default.. http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm On 7/20/05, JesterXL [EMAIL PROTECTED] wrote: Is their creationPolicy not set to all? - Original Message - From: Clint Modien To: flexcoders@yahoogroups.com 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. Check the link. 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 Sent: Wednesday, July 20, 2005 9:53 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] initializing global variables OK so umm... http://livedocs.macromedia.com/flex/15/flex_docs_en/0505.htm I'm confused. My grandkids and my kids get initialized before I do? (The application) Uhh... how am I supposed to setup the any global vars in the app? Even the creationCompletes of my grandkids fires before the app does. What's the first event to fire in the Application that I can use to initialize a global var? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Computer software testing Macromedia flex Development Software developer YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.