You could add a method to both interfaces, like isCheckboxDefined(), and let
the script decide upon that.

Another solution would be a more polymorphic approach. Let the script
delegate to the interface the custom behavior, and let each interface (or
the .as it extends) know what to do.

Another solution would be to use one interface instead of two, and disable
the checkbox for one of them.




On Jan 31, 2008 1:54 PM, Merrill, Jason <[EMAIL PROTECTED]>
wrote:

>    What I mean is, why are you doing it this way?  Two "script files" -
> you mean each MXML app uses the same class definition?  Why can't you define
> the variable in both files?  Or why insist on sharing the class between
> both?  If the class has specifics to one application, it should not be
> shared between apps without being modified IMO.  Unless I'm not
> understanding something about your setup.
>
>
> 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 *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.
>
>    
>

Reply via email to