can someone tell me how I can identify the type of an object in flex? In particular I have an array where I store multiple types in (but all UIComponents) now as I evaluate the array I want to find out whether I have a TextInput Control or a RadioButton. Does someone have an idea?
Thanks in advance
You can either test against a particular class using the "is" operator or you can use flash.utils.getQualifiedClassName() (you pass it your object) - which will return a string of the fully qualified class name.
ITS WORKING :)
Following is the way I solved this issue
switch( true )
{
case item is Customer_SF:
c = item as Customer_SF;
break;
case item is Opportunity:
o = item as Opportunity;
break;
case item is Product:
o = ( item as Product )._opportunity;
break;
default:
return true;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With