I need to detect if a property of an object is numeric or not ( Int or Float ) What I have is the object reference, and property name as string
Here is my implementation, compoent
is the object reference, but it didn't work
public function IsNumeric():Bool
{
if (Std.is(Type.typeof(Reflect.getProperty(compoent, propertyName)), Int)) return true;
if (Std.is(Type.typeof(Reflect.getProperty(compoent, propertyName)), Float)) return true;
return false;
}
Any one can help?