I have a simple tree that is populated via a dataprovider :
var projectData:XML that is created from an XML file by through
initApplication() function triggered by the Application's
All is (apparently ) fine, tree is displayed with the proper
labels and change/open/click event handlers.
However, I'm trying to set the projectTree.selectedIndex=0;
as part of the initialization sequence, by a initTree() function
associated with the tree's creationComplete event. It DOESN'T Work
If I perform the assignment " projectTree.selectedIndex=0; "
from a button action, its works OK (e.g. the node is highlighted as
selected ). It's possible that the initialization sequence doesn't
occur as I anticipate ? that the creationComplete event is fired
before the tree is fully generated ?
triggering the .selectedIndex = n ; from the application
creationComplete works. I guess the tree' creationComplete is a bit
pre-mature to trigger . It's good to know, I wonder if for nested
components it 'cascades' up one level (to direct parent), or you
always have to link it to the top level ( e.g. the application ..)