Wednesday, April 16, 2008
...
import flash.utils.describeType;
...
public function addState( oValue:* ):void
{
var varList:XML = describeType( oValue );
var result:String = varList.type.@name.toXMLString();
}
The above did absolutely nothing for me. result was never set. I pulled my hair out for 20 minutes, and then realized that when you use describeType, the XML returned to an accessor variable sets its root to that variable.
So I didn't need to do varList.type.@name.toXMLString() but I needed to ONLY do this varList.@name.toXMLString().
That wasn't exactly clear to me, but it is now. A simple thing to assume or miss for me.







