The tree defenition:
<mx:Tree id="accountTree" height="100%" width="100%"
dataProvider="{accountsData}" labelField="@name"
iconFunction="treeIcon" itemClick="onItemClicked(event);" >
</mx:Tree>
Upon loading I'm calling this fuction that works great:
private function handleGetAccounts(result:XML): Boolean
{
accountsData = new XMLListCollection(result.act);
return true;
}
Upon clicking on an item I'm calling this function which doesn't work
private function handleGetChildren(result:XML): Boolean
{
if (accountTree.selectedItem != null)
{
accountTree.selectedItem.setChildren(new
XMLListCollection(result.act))
accountTree.expandItem(accountTree.selectedItem,true,true);
}
return true;
}
*** The handle messages are being called after the async call of
HTTPSerivce has return