Hi Derek, Thanks for your thoughts. My situation is that I have two Trees that are populated by the same XML data. What I would like to do is :
When the user selects a node on Tree1, the same node in Tree2 is selected. How would one do this do you think. Tim On 1/23/06, Derek Vadneau <[EMAIL PROTECTED]> wrote: > > You are getting the display index and then trying to get a node based on > that index. That won't work like you expect. > > The display index refers to the nodes position VISUALLY in the tree. This > may have nothing to do with the nodes' position in the XML. > > If you have this in a tree: > Folder 1 (open branch) > - Item 1 (leaf) > - Item 2 (leaf) > Folder 2 (closed branch) > Folder 3 (open branch) > - Item 1 (leaf) > - Item 2 (leaf) > > The display index of the Folder 3 > Item 1 node is 5. Yet if you tried to > get the node at 5 (i.e. tree.getTreeNodeAt(5)) it would return undefined, > since there is no node at index 5 of the tree. > > When you say tree.getTreeNodeAt(index), the index refers to the childNodes > array of the tree. > > Does that help? > > > Derek Vadneau > > ----- Original Message ----- > From: "Tien Nguyen" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Monday, January 23, 2006 3:19 PM > Subject: SPAM-LOW: [Flashcoders] Flash8 Tree Gurus > > > Hi All, > > I've been working with Flash8 Tree and have the following situation: > > var treeIndex:Number = layoutTree.getDisplayIndex( > layoutTree.selectedNode); > trace("SelectedTreeIndex = " + treeIndex); > > trace("TreeChanged = " + layoutTree.selectedNode ); > trace("TreeNode = " + layoutTree.getTreeNodeAt(treeIndex)); > > The problem is that the TreeNode value from the trace is "Undefined". > > Oddity: When the treeIndex value is 0, then the TreeNode value is the > correct XML of the entire tree. > > I am working with ARP architecture. What would the problem be in this > case. > > Sincerely > > Tim > > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

