|
Hey Guys, my problem was, that the tree was reacting weird when scrolling around after adding data to its dataprovider (XMLListCollection) using setChildren. (When the user clicks a branch node, it's childnodes should be loaded from my streamingserver (=returns XML)) I found out, that the problem was, that the tree wasn't "prepared" for the "arrival" of new childnodes.. The nodes (branchNodes) where I wanted to add children later gave me the return valueof false on asking hasChildren() And there lies the problem: The tree doesn't expect new children and reacts a little bit weird (which maybe belongs to the uncorrect use of measure, as you said, Mike). Anyway, I solved my problem like this: When first generating my DataProvider I added on each empty branch node a single node with just the label "loading...", what makes the datadescriptor return true on hasChildren. When the subenodes are loaded, I just delete the "loading..." node, as you can see on these screenshots: http://marcelfahle.com/labs/flex2/screens/cptreeproblem1.jpg http://marcelfahle.com/labs/flex2/screens/cptreeproblem2.jpg http://marcelfahle.com/labs/flex2/screens/cptreeproblem3.jpg Using this "hack" everything works good for me.. If anybody wants to see it in action, just drop me a line off-list.. Michael Schmalle wrote:
__._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |
- Re: Re: [flexcoders] Re: How to refresh a tree Marcel Fahle
- Re: [flexcoders] Re: How to refresh a tree Marcel Fahle
- [flexcoders] Re: How to refresh a tree lyon.james

