This content has been marked as final. Show 7 replies
I use:1 person found this helpful
treeData.expandItem(nodeCur, true, false);
What is nodeCur? That was my question.
Pass in the actual node. In your case, it would be the XML node for "Music Videos", which should be xml.node;1 person found this helpful
There is no "node" property of the XML class. It throws a runtime error if I try. (null object reference).
Oh, apparently if you try that call right after you create the Tree, it will throw a null reference exception. That might count as a bug in the flex api...
If you create a Tree, and give it's dataProvider some xml data, and then add it to the stage (addChild), and then you call expandItem or expandChildrenOf() right after, you will get a null object exception. You have to wait... for something. I don't know what.
I even tried calling _tree.invalidateList() before the expandItem, but it will still throw the error...
I wonder what the Tree needs to wait for? Is this a bug for Adobe to fix?
The List controls normally need a beat before they update their state. I believe it's because an invalidate happens on the next frame or some such (it's just how they're designed). I've always used the callLater() method when doing such things.
hi,1 person found this helpful
plz follow this steps i think u get solution
//MailFolderLists is id of TreeControl