开发者

Flex Tree, Slelecteditem == XML(node);... BUG?

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());

i get error that object is null...


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().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜