Hi Guys. Thanks for the replies.
@Paul: That was pretty much the conclusion I was coming to. The example I gave is a very much simplified example of the actual situation, as I didn't want to bore you all with the full scenario. The full senario is that I have a date property on a VO and I am parsing data and want to treat properties differently based on their type. Any property that has a default of "null" (pretty much only the simple values had automatic defaults) will have this issue @Ryan: I'd tried that function already and it has the same result as "describeType". As the default value for a "Date" data type is null, untill I actually assign a date variable to it, I will get "null". thanks! On Mon, Sep 14, 2009 at 3:53 AM, Ryan Kruse <[email protected]> wrote: > > > 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" <[email protected]> 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 > > > > > > >

