开发者

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

开发者 https://www.devze.com 2022-12-22 11:22 出处:网络
when i selected a XML node to tree 开发者_开发问答by doing... i am using flex SDK 3.5 it was working fine in SDK 3.

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

精彩评论

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

关注公众号