I have a tree that is populated by an external xml file.
I have set up a handler that executes when a tree node label is clicked. This handler opens all child nodes of the clicked node.
However, I want the tree root node to be expanded in the same way when the xml is loaded and set as the tree dataprovider.
So I have set up a function to take care of this.
The problem is that the root node is not expanded, even if the exact same code is executed as when clicking a label to expand a node.
Tracing shows that everything is identical in the two cases.
So I wonder, why dont the tree expand at startup ?
Any help will be greatly appreciated as this drives me nuts...
Maybe you are running the code before the dataprovider and tree are ready?
Try delaying with callLater or running the code on creationComplete or after
the dataProvider is assigned.
Thanks Flex harUI.
CallLater did it.