when i selected a XML node to tree by doing... i am using flex SDK 3.5 it was working fine in SDK 3.
tree.selectedItem=XML(node);
and then get..
trace(tree.selectedItem.toString());
when i selected a XML node to tree by doing... i am using flex SDK 3.5 it was working fine in SDK 3.
tree.selectedItem=XML(node);
and then get..
trace(tree.selectedItem.toString());
It looks like your cast to XML
is yielding a null.
Try this...
var x = node as XML;
trace(x.toString());
If you halt the debugger at the line before and inspect node
, what type is it? My bet is that node
and XML
are not compatible types and the above will throw the same error.
actually its bug in Flex SDK 4.0 ,,, you can assign using callLaterFunction().