In one interface, there's a checkbox that doesn't exist in the other interface. They both reference the same script file, which tests the checkbox's "selected" variable. I'm getting an error with the interface that's lacking, because the script is trying to test a checkbox that's undefined in the interface.
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, January 31, 2008 10:50 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How do I test if a variable is defined? Why is it undefined in the first place? Jason Merrill Bank of America GT&O L&LD Solutions Design & Development eTools & Multimedia Bank of America Flash Platform Developer Community ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clinton D. Judy Sent: Thursday, January 31, 2008 10:43 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How do I test if a variable is defined? I get this: "1012: Variables of type CheckBox cannot be undefined. The value undefined will be type coerced to CheckBox before comparison." Hmm... From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, January 31, 2008 10:39 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How do I test if a variable is defined? Have you tried checking for myVar != undefined? Jason Merrill Bank of America GT&O L&LD Solutions Design & Development eTools & Multimedia Bank of America Flash Platform Developer Community ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clinton D. Judy Sent: Thursday, January 31, 2008 10:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] How do I test if a variable is defined? No other explanation needed, really. How do I see if an object/variable exists before I test other conditions of it? Unnecessary explanation: I use two completely separate mxml interfaces that both use one as script file. One program is just missing some information that the other one has. I'd like to keep using the same script file, but it references a variable that exists in one file that doesn't exist in the other file, and I need to make sure it exists before I use it. Clinton Judy Web Developer Glenn O. Hawbaker, Inc.