Is it possible to figure out the variable type when the variable isn’t instantiated?
Example of what I’m trying to accomplish:
var foo:ExampleOne;
var bar:ExampleTwo;
var arr:Array = [foo, bar];
for each(var myVar:Object in arr)
{
myClass = new getDefinitionByName( getQualifiedClassName( myVar ) ) // doesn't work
}
No, because the variables are a reference to objects that are not created in the vm until you create them using the “new” keyword. So until you do this, the references (foo/bar etc) will always be null no matter what operation you’re running on them.