[haXe] Using Type.typeof
Benjamin Dasnois
benjamin.dasnois at gmail.com
Wed Aug 1 11:23:54 CEST 2007
Hello,
Try this :
if (Std.is(fieldData, TObject))
{
//fieldData is of type TObject
} else
{
//fieldData is not of type TObject
}
Regards,
Benjamin DASNOIS
On 8/1/07, John Axel Eriksson <john at insane.se> wrote:
> If I'd like to compare the type of a value and check if it is
> TObject, how would I do that?
>
>
> I have tried:
>
> if ( Type.typeof(fieldData) == TObject )
>
> if ( Type.typeof(fieldData) == "TObject" )
>
> if ( Type.typeof(fieldData) == ValueType.TObject )
>
> and some other ways but none of these are correct. I guess this is a
> simple one, but I can't seem to figure it out.
>
>
> /J
>
> --
> haXe - an open source web programming language
> http://haxe.org
>
More information about the Haxe
mailing list