RE: [Flashcoders] How to test URLVariables members
Hi Alex, You could use a 'try/catch' block... e.g. try { if (vars.myname != undefined){ // do something } } catch (e:Error) { trace("ERROR: your error info here"); } -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Alexander Farber Sent: Thursday, 5 November 2009 10:08 AM To: Flash Coders List Subject: [Flashcoders] How to test URLVariables members How do you test (without warnings and errors) if a var vars:URLVariables contains something on an Event.COMPLETE? For example if there is a vars.myname set? (I.e. otherwise vars.myname would be undefined - according to http://help.adobe.com/en_US/AS3LCR/Flash_10.0/package.html#undefined ) Is the following correct: if (vars.myname != undefined) Can you compare undefined to undefined? Thank you Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to test URLVariables members
check for null maybe. If something doesn't exist it would throw a null. B. On Wed, Nov 4, 2009 at 4:08 PM, Alexander Farber wrote: > How do you test (without warnings and errors) if a > > var vars:URLVariables > > contains something on an Event.COMPLETE? > > For example if there is a vars.myname set? > (I.e. otherwise vars.myname would be undefined - according to > http://help.adobe.com/en_US/AS3LCR/Flash_10.0/package.html#undefined ) > > Is the following correct: > > if (vars.myname != undefined) > > Can you compare undefined to undefined? > > Thank you > Alex > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] How to test URLVariables members
How do you test (without warnings and errors) if a var vars:URLVariables contains something on an Event.COMPLETE? For example if there is a vars.myname set? (I.e. otherwise vars.myname would be undefined - according to http://help.adobe.com/en_US/AS3LCR/Flash_10.0/package.html#undefined ) Is the following correct: if (vars.myname != undefined) Can you compare undefined to undefined? Thank you Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders