Thanks Wayne! I will keep your suggestion in mind in case problems occur with the XML loading/init process.
Sascha > -----Original Message----- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of wayneposner > Sent: Wednesday, 27 September, 2006 22:25 > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Auto-expand Treenodes > > Depending on how you are calling that code, you may need to add a > try catch block around it. I originally had my app loading XML data > during the initialize process. It then fed that data directly into > a tree. Since the tree had data right away, that line of code > worked fine. > > I've recently changed things a bit so that the app loads with no XML > data loaded. I was also getting the same eror you were until I put > a try catch block around it. The auto expand code was getting > called, but since there was no data in my tree, the try catch > prevented any errors. > > You can also use: > assemblyTree.expandChildrenOf(assemblyTree.selectedItem, true); > > to expand a specific node in the tree. > > Wayne -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/