Try out flex.utils.  I thing there is a getFullyQualifiedClassname method or
something like that.  That may work for null objects.

Ryan

On Sep 13, 2009 8:26 AM, "Paul Andrews" <p...@ipauland.com> wrote:



David Harris wrote: > Hi everyone, > > I have a situation where I want to
tell a value is of type ...
No, and it doesn't make any sense to do so.

var b: Date;

Tells the compiler that variable b is to be used to reference a Date
object; It allows the compiler to make sure that you keep to that
contract. By not assingning the variable b, you leave it referencing
nothing - null;

( b is Date )

is now asking to check that a variable pointing at nothing (null) is a
Date. It is not a Date, so the result is false.

You ask about knowing the variables type - well you already do - you've
told the compiler that b will hold a Date.

For your purposes, the (something is Someclass) will always return false
when something is a null reference - it cannot be any other result.

Paul
> cheers
>
> David
>
>

 

Reply via email to