Re: [flexcoders] Re: How to refresh a tree
You've probably solved this problem in the meantime, I post this since there's no answer provided (also, I'd like to know if anyone has a better solution). I had the same problem with you, the tree was going crazy when trying to add children to a node (well, I'm using ArrayCollections instead of XMLs, but I guess it's the same thing). The only way I could get it working was tree.dataProvider.removeItemAt(x) ; tree.dataProvider.addItemAt({label: oldLabel, children: result}, x) ; tree.invalidateDisplayList(); Regards, GK On 9/11/06, lyon.james [EMAIL PROTECTED] wrote: My problem isn't solved by your suggestion unfortunately. My tree shows the correct data but still doesn't update the scrollbar appropriately. And at times children nodes will overlap parent nodes further down the list. I've been calling validateDisplayList on the tree, but should I call it on something else? -- 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/
[flexcoders] Re: How to refresh a tree
My problem isn't solved by your suggestion unfortunately. My tree shows the correct data but still doesn't update the scrollbar appropriately. And at times children nodes will overlap parent nodes further down the list. I've been calling validateDisplayList on the tree, but should I call it on something else? --- In flexcoders@yahoogroups.com, Marcel Fahle [EMAIL PROTECTED] wrote: 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: Hi, There is some issues with the Tree and XML dtat provider collections. One thing I can suggest is; Add an event listener to the divider bar release, I can't remeber what it is, in that handler call myTree.invalidateList(); Give it a try and let me know. I have the same issues with using itemRenderers and changing some internal data specific things. After I am done with my process, I called invalidateList() and it did a nice redraw quickly. There probably is just an update isse and measure() is not being called correctly. Peace, Mike On 8/23/06, *e baggg* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I too have had problems with XML nodes in tree. One thing that eliminated a lot of the issues was reassigning the dataProvider of the tree explictly (right after you update the node. so... [Bindable] private var xmlN : XML private function updateTreeDataProvider : void { //code that updates xmlN treeNav.dataProvider= xmlN; } mx:Tree id=treeNav */Marcel Fahle [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]/* wrote: Hi Dave, did you found a solution on that? I've got a similar problem here. Marcel Dave Bobby wrote: This is flaky, might be a bug. root -a --aa --ab --ac -b -c --ca --cb --cc say the last server retrieval got ca, cb and cc. but the tree did not show a scrollbar. this tree is in a vDivided box, so when i move the divider upto b, i see a scrollbar, but when i move divider to cb or cc, ca-cb and cc disappear and no scrollbar. bug? or am i doing something wrong? i think that the tree should be refreshing when i do such operations. thanks. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Dave Bobby dvbob001@ wrote: I am trying to append data retrieved to selectedItems in the tree represented by an XMLListCollection. During the trace I see that the retrieived items have been added to the XMLListCollection correctly and this collection in Bindable. But the tree itself behaves wierd. Sometimes it shows the scrollbars, sometimes not. Sometimes, when I scroll up and down, it collates different nodes to different parents visually. Any ideas? Thanks. Dave. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com http://yahoo.com -- What goes up, does come down. -- 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 *
Re: Re: [flexcoders] Re: How to refresh a tree
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: Hi, There is some issues with the Tree and XML dtat provider collections. One thing I can suggest is; Add an event listener to the divider bar release, I can't remeber what it is, in that handler call myTree.invalidateList(); Give it a try and let me know. I have the same issues with using itemRenderers and changing some internal data specific things. After I am done with my process, I called invalidateList() and it did a nice redraw quickly. There probably is just an update isse and measure() is not being called correctly. Peace, Mike On 8/23/06, e baggg [EMAIL PROTECTED]com wrote: I too have had problems with XML nodes in tree. One thing that eliminated a lot of the issues was reassigning the dataProvider of the tree explictly (right after you update the node. so... [Bindable] private var xmlN : XML private function updateTreeDataProvider : void { //code that updates xmlN treeNav.dataProvider= xmlN; } mx:Tree id="treeNav" Marcel Fahle [EMAIL PROTECTED]com wrote: Hi Dave, did you found a solution on that? I've got a similar problem here. Marcel Dave Bobby wrote: This is flaky, might be a bug. root -a --aa --ab --ac -b -c --ca --cb --cc say the last server retrieval got ca, cb and cc. but the tree did not show a scrollbar. this tree is in a vDivided box, so when i move the divider upto b, i see a scrollbar, but when i move divider to cb or cc, ca-cb and cc disappear and no scrollbar. bug? or am i doing something wrong? i think that the tree should be refreshing when i do such operations. thanks. --- In [EMAIL PROTECTED]ups.com, "Dave Bobby" [EMAIL PROTECTED] wrote: I am trying to append data retrieved to selectedItems in the tree represented by an XMLListCollection. During the trace I see that the retrieived items have been added to the XMLListCollection correctly and this collection in Bindable. But the tree itself behaves wierd. Sometimes it shows the scrollbars, sometimes not. Sometimes, when I scroll up and down, it collates different nodes to different parents visually. Any ideas? Thanks. Dave. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- What goes up, does come down. __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [flexcoders] Re: How to refresh a tree
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: Hi, There is some issues with the Tree and XML dtat provider collections. One thing I can suggest is; Add an event listener to the divider bar release, I can't remeber what it is, in that handler call myTree.invalidateList(); Give it a try and let me know. I have the same issues with using itemRenderers and changing some internal data specific things. After I am done with my process, I called invalidateList() and it did a nice redraw quickly. There probably is just an update isse and measure() is not being called correctly. Peace, Mike On 8/23/06, e baggg [EMAIL PROTECTED]com wrote: I too have had problems with XML nodes in tree. One thing that eliminated a lot of the issues was reassigning the dataProvider of the tree explictly (right after you update the node. so... [Bindable] private var xmlN : XML private function updateTreeDataProvider : void { //code that updates xmlN treeNav.dataProvider= xmlN; } mx:Tree id="treeNav" Marcel Fahle [EMAIL PROTECTED]com wrote: Hi Dave, did you found a solution on that? I've got a similar problem here. Marcel Dave Bobby wrote: This is flaky, might be a bug. root -a --aa --ab --ac -b -c --ca --cb --cc say the last server retrieval got ca, cb and cc. but the tree did not show a scrollbar. this tree is in a vDivided box, so when i move the divider upto b, i see a scrollbar, but when i move divider to cb or cc, ca-cb and cc disappear and no scrollbar. bug? or am i doing something wrong? i think that the tree should be refreshing when i do such operations. thanks. --- In [EMAIL PROTECTED]ups.com, "Dave Bobby" [EMAIL PROTECTED] wrote: I am trying to append data retrieved to selectedItems in the tree represented by an XMLListCollection. During the trace I see that the retrieived items have been added to the XMLListCollection correctly and this collection in Bindable. But the tree itself behaves wierd. Sometimes it shows the scrollbars, sometimes not. Sometimes, when I scroll up and down, it collates different nodes to different parents visually. Any ideas? Thanks. Dave. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- What goes up, does come down. __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [flexcoders] Re: How to refresh a tree
I too have had problems with XML nodes in tree. One thing that eliminated a lot of the issues was reassigning the dataProvider of the tree explictly (right after you update the node.so...[Bindable]private var xmlN : XML private function updateTreeDataProvider : void {//code that updates xmlN treeNav.dataProvider= xmlN;}mx:Tree id="treeNav" Marcel Fahle [EMAIL PROTECTED] wrote: Hi Dave, did you found a solution on that? I've got a similar problem here. Marcel Dave Bobby wrote:This is flaky, might be a bug.root -a --aa --ab --ac -b -c --ca --cb --ccsay the last server retrieval got ca, cb and cc. but the tree did not show a scrollbar. this tree is in a vDivided box, so when i move the divider upto b, i see a scrollbar, but when i move divider to cb or cc, ca-cb and cc disappear and no scrollbar.bug? or am i doing something wrong? i think that the tree should be refreshing when i do such operations.thanks.--- In [EMAIL PROTECTED]ups.com, "Dave Bobby" [EMAIL PROTECTED]. wrote: I am trying to append data retrieved to selectedItems in the tree represented by an XMLListCollection. During the trace I see that the retrieived items have been added to the XMLListCollection correctly and this collection in Bindable.But the tree itself behaves wierd. Sometimes it shows the scrollbars, sometimes not. Sometimes, when I scroll up and down, it collates different nodes to different parents visually. Any ideas?Thanks.Dave. __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [flexcoders] Re: How to refresh a tree
Hi,There is some issues with the Tree and XML dtat provider collections.One thing I can suggest is;Add an event listener to the divider bar release, I can't remeber what it is, in that handler call myTree.invalidateList();Give it a try and let me know.I have the same issues with using itemRenderers and changing some internal data specific things. After I am done with my process, I called invalidateList() and it did a nice redraw quickly. There probably is just an update isse and measure() is not being called correctly.Peace, MikeOn 8/23/06, e baggg [EMAIL PROTECTED] wrote: I too have had problems with XML nodes in tree. One thing that eliminated a lot of the issues was reassigning the dataProvider of the tree explictly (right after you update the node.so...[Bindable] private var xmlN : XML private function updateTreeDataProvider : void {//code that updates xmlN treeNav.dataProvider= xmlN;}mx:Tree id=treeNav Marcel Fahle [EMAIL PROTECTED] wrote: Hi Dave, did you found a solution on that? I've got a similar problem here. Marcel Dave Bobby wrote:This is flaky, might be a bug.root -a --aa --ab --ac -b -c --ca --cb --ccsay the last server retrieval got ca, cb and cc. but the tree did not show a scrollbar. this tree is in a vDivided box, so when i move the divider upto b, i see a scrollbar, but when i move divider to cb or cc, ca-cb and cc disappear and no scrollbar.bug? or am i doing something wrong? i think that the tree should be refreshing when i do such operations.thanks.--- In flexcoders@yahoogroups.com, Dave Bobby [EMAIL PROTECTED] wrote: I am trying to append data retrieved to selectedItems in the tree represented by an XMLListCollection. During the trace I see that the retrieived items have been added to the XMLListCollection correctly and this collection in Bindable.But the tree itself behaves wierd. Sometimes it shows the scrollbars, sometimes not. Sometimes, when I scroll up and down, it collates different nodes to different parents visually. Any ideas?Thanks.Dave. __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- What goes up, does come down. __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [flexcoders] Re: How to refresh a tree
Hi Dave, did you found a solution on that? I've got a similar problem here. Marcel Dave Bobby wrote: This is flaky, might be a bug. root -a --aa --ab --ac -b -c --ca --cb --cc say the last server retrieval got ca, cb and cc. but the tree did not show a scrollbar. this tree is in a vDivided box, so when i move the divider upto b, i see a scrollbar, but when i move divider to cb or cc, ca-cb and cc disappear and no scrollbar. bug? or am i doing something wrong? i think that the tree should be refreshing when i do such operations. thanks. --- In [EMAIL PROTECTED]ups.com, "Dave Bobby" [EMAIL PROTECTED]. wrote: I am trying to append data retrieved to selectedItems in the tree represented by an XMLListCollection. During the trace I see that the retrieived items have been added to the XMLListCollection correctly and this collection in Bindable. But the tree itself behaves wierd. Sometimes it shows the scrollbars, sometimes not. Sometimes, when I scroll up and down, it collates different nodes to different parents visually. Any ideas? Thanks. Dave. __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
[flexcoders] Re: How to refresh a tree
any ideas on how to solve the problem? say i have this tree with root node, i open root node and append the retrieved xml from server to root node and tree opens up and i can see the tree. when the tree gets bigger than the display area, there is no scrollbar that is automatically added, any ideas why? Thanks. --- In flexcoders@yahoogroups.com, Dave Bobby [EMAIL PROTECTED] wrote: I am trying to append data retrieved to selectedItems in the tree represented by an XMLListCollection. During the trace I see that the retrieived items have been added to the XMLListCollection correctly and this collection in Bindable. But the tree itself behaves wierd. Sometimes it shows the scrollbars, sometimes not. Sometimes, when I scroll up and down, it collates different nodes to different parents visually. Any ideas? Thanks. Dave. -- 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/ * 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/
[flexcoders] Re: How to refresh a tree
This is flaky, might be a bug. root -a --aa --ab --ac -b -c --ca --cb --cc say the last server retrieval got ca, cb and cc. but the tree did not show a scrollbar. this tree is in a vDivided box, so when i move the divider upto b, i see a scrollbar, but when i move divider to cb or cc, ca-cb and cc disappear and no scrollbar. bug? or am i doing something wrong? i think that the tree should be refreshing when i do such operations. thanks. --- In flexcoders@yahoogroups.com, Dave Bobby [EMAIL PROTECTED] wrote: I am trying to append data retrieved to selectedItems in the tree represented by an XMLListCollection. During the trace I see that the retrieived items have been added to the XMLListCollection correctly and this collection in Bindable. But the tree itself behaves wierd. Sometimes it shows the scrollbars, sometimes not. Sometimes, when I scroll up and down, it collates different nodes to different parents visually. Any ideas? Thanks. Dave. -- 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/ * 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/