Мне нужно определить, является ли свойство объекта числовым или нет (Int или Float). У меня есть ссылка на объект и имя свойства в виде строки
Вот моя реализация, compoent
- ссылка на объект, но она не сработала
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;
}
Кто-нибудь может помочь?