You're welcome,
The reason I posted that particular item is that AFAIK Gordon is one of the
engineers who actually writes the code for the player.
If there's a disagreement between him and the documentation, my money's on
him every time.
Having said that, this stuff is all likely to change and may not be true in
future betas or the final release, but it should be right for the public
alpha version.
Unfortunately I don't know enough to answer your questions with any degree
of certainty. The only people with proper access to that sort of stuff are
Macromedians. With a bit of luck someone may chirp up and clarify.
Spike
On 10/22/05, Robert Edgar <[EMAIL PROTECTED]> wrote:
>
> Thanks spike for taking the time to reply but.......
>
> Calling it legacy seems to contradict the current AS3 docs..
>
> For example I think it is getStyle that is documented to return undefined
> if
> the style property doesn't not exist, it then goes on to say that the
> "undefined" it returns is NOT the same as null (undefined!=null).
>
> So I take from that that undefined far from being legacy is alive and well
> and activley used by MM in AS3...
>
> Of course could be then docs are wrong or will change.
>
> I note the comment about how it only applies to Object though and
> understand
> how when assigned the value will be coerced, thanks.
>
> It seemed to me that the docs were effectively setting a recommended
> practice that for generic "getAnyProperty" type of functions they should
> return undefined for undefined values rather than as at present return
> null(because currently undefined==null).
>
> I am somewhat confused now if MM regard undefined as legacy i.e.
> deprecated,
> should we being returning undefined or null.
>
>
> Also given that undefined!=null makes me wonder..
>
> if(!x){...}else{}
>
> Does this work differently in AS3 dependent on whether x is undefined or
> null or does AS3 require explicit check for nullness "if(x!=null)"
>
> Rob
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Spike
> Sent: Friday, October 21, 2005 5:42 AM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] Undefined and null in Flex2
>
>
> Hi Robert,
>
> Gordon Smith from Macromedia posted this to another list a while ago. I am
> reproducing it with his permission. Hopefully it will clarify things a
> bit:
>
> Note, that this applies only to AS 3, not to AS 2
>
> ***************************************************************
> 'undefined' is basically legacy baggage in AS3 that must remain for
> ECMA-262 compatibility.
>
> Type Object is the ONLY type that can store the value undefined. It can
> also
> store the value null... it can store anything!
>
> Some but not all other classes can store null:
>
> A derived class like Button can store null but not undefined.
>
> String and Array can store null but not undefined.
>
> Number can store NaN but it can't store undefined or null.
>
> int and uint can't store NaN, undefined, or null; they only store integers
> like 23.
>
> Boolean can't store undefined or null; it only stores true and false.
>
> Since Object is the only type that can store undefined, if you try to set
> a
> var of another type to undefined, it will be coerced into something
> different. For example, setting a Number to undefined will coerce it to
> NaN.
>
> - Gordon
> *********************************************************************
>
> Spike
>
>
> On 10/21/05, Robert Edgar <[EMAIL PROTECTED]> wrote:
> >
> > AFAIK null and undefined are the same thing in F7/8 and can be used
> > interchangeably Conceptually however we tend to think of 'undefined'
> > and 'defined but has a
> > null value' as two different things.
> >
> > >From what I have read in the Flex2 documentation undefined and null
> > >are
> > no
> > longer the same thing and null means 'defined but has a null value'.
> >
> > Can someone confirm that is correct.
> >
> > Thanks
> > Rob
> >
> >
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> --------------------------------------------
> Stephen Milligan
> Do you do the Badger?
> http://www.yellowbadger.com
>
> Do you cfeclipse? http://www.cfeclipse.org
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
--
--------------------------------------------
Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com
Do you cfeclipse? http://www.cfeclipse.org
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders