I have been struggling with trying to correctly dynamically
update a Tree control when modifying the source XML, but now it
seems as if the problem might be in Flex not in my code. I tried to
build the first example from the "Flex Quick Starts: Working with
Tree controls" article but it does not behave correctly, and yet
the original example .swf in the article works fine.
I took the following steps to reproduce the problem:
1. Download TreeAddRemoveNodes.mxml from
http://www.adobe.com/devnet/flex/quickstart/working_with_tree/ 2. Build it using "mxmlc TreeAddRemoveNodes.mxml"
3. Open the resulting .swf in the player (either standalone
4. Expand the "Operations" folder in the tree
5. Type a name in the text box, e.g. "test"
6. Click the "Add Operations Employee" button
When I follow these steps the tree control display is
corrupted, i.e. there appear to be two instances of the Operations
node and its children, including the newly added "test" leaf. After
collapsing the Operations node the display is fixed.
I am using Flex 2.0.1 SDK (build 155542) on Windows Vista.
The working .swf on the web page was apparently built with Flex 2.0
Can anyone else reproduce this? Is the bug in the example
code or in Flex itself? Is it possible for me to download the
previous version of Flex (2.0.0) to further diagnose the problem?