In the API docs it says about "undefined"

public const undefined:*

A special value that applies to untyped variables or dynamic object
properties that have not been initialized. The value undefined applies to
untyped variables that have not been initialized. In ActionScript 3.0 only
variables that are untyped can hold the value undefined, which is not true
in ActionScript 1.0 and ActionScript 2.0. For example, both of the following
variables are undefined because they are untyped and unitialized:

var foo;
var bar:*;

So I just assumed "undefined" was only for use with untyped and/or
unitialized dynamic vars.  There's nothing here about typing as Object. 
Maybe the docs have conflicting information in different places since the
recent change to undefined???

Darren




>From: "Tracy Spratt" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: <[email protected]>
>Subject: [flexcoders] ? Variables of type Object can not be undefined. 
>undefined will be type coerced to Object before comparison.
>Date: Tue, 23 May 2006 17:35:42 -0400
>
>Why is the compiler is giving me this error when I do a comparison:
>var bValid:Object;
>if (bValid == undefined) ...
>
>Even though the docs state:
>In ActionScript 3.0, undefined is only for use with type Object.
>
>The doc is the latest Migration Guide pdf.
>
>Tracy




--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to