In my previous post to this list, I included a link to my Adobe forum post which includes a simple program that reproduces the error. For your convenience, here's a direct link to the post in that thread that contains the code: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid=1366770&enterthread=y#4977869
I haven't found any facility for attaching a file to a posting to this list, so I think going to that link is the best way to get the code to you. You'll just need to copy/paste that code into an MXML file and compile. Running it will demonstrate the erroneous behavior, and if you remove the line near the bottom of the script (commented so as to be obvious which one), the behavior will be as expected. Thank you for your help. --- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Had trouble following. Post a small test case. > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of yanroyss > Sent: Tuesday, June 03, 2008 8:00 AM > To: [email protected] > Subject: [flexcoders] tree control incorrectly displays nodes marked as > "open" > > > > Hi, > I've been having a very odd problem using the Tree control with a > HierarchicicalCollectionView as the dataProvider. I've been to the > Adobe Forums and #flex on irc.freenode.org looking for help and so far > I've come up empty. I was told on IRC that Flexcoders is the right > place to look for help :) > > The problem is very simple, but somewhat difficult to describe. For > reasons I'm still a little hazy on, the root node of the tree is > displayed along side (on the same level) as its first-level children. > All nodes that have children are correctly marked as expandable with > the disclosure icon. Clicking said icon will cause the next level of > the hierarchy to be displayed, which also suffers from the same > problem: it will display all 2nd-level children AND their children on > the 2nd level. I believe this problem stems from the way the Tree > control iterates over the collection -- it uses > ICollectionView.createCursor() instead of using the dataDescriptor > property of the Tree control to do that operation (which the docs > imply it does). > > After much frustration and dead ends, I discovered that this bug only > manifests when the nodes in the HierarchicalCollectionView are marked > as "open" using openNode(). If the nodes are closed, it works as > expected. This is very unfortunate for my application, as I'm > creating an app that displays the organization structure of a company. > The control I use for drawing the chart requires all the nodes in the > tree to be "open" in the dataProvider, but the Tree control that I'd > like to use to provide quick navigation around the organization seems > to require just the opposite. > > My questions are simple: why does this happen? Is it really a bug? > Should I report it? (probably, if it is a bug...) Has anyone ever see > this before, and if so, how did they deal with it? > > Thank you very much for any help you can provide. > > You can find my original post on the Adobe Flex forums (along with a > simple reproduction recipe for the problem) here: > http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60& > catid=585&threadid=1366770&enterthread=y > <http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60 > &catid=585&threadid=1366770&enterthread=y> >

