If any control (e.g. a DataGrid) is cast to UIComponent, how can you get its type at runtime?
Is this possible in Actionscript?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
getQualifiedClassName()to get class name by the value as a string. You can usedescribeType()to get the full information about class. And you can useconstructorproperty to get class itself (to instantiate new instance by existing instance). Finally you can useisoperator to compare to the limited set of classes. Less recommended usage oftypeofoperator which is rather obsolete.To select the right way we need to know your particular problem.