0 Replies Latest reply on Dec 12, 2007 7:26 PM by KeevonBuu

    Tree selectedIndex broken?

    KeevonBuu
      I am trying to implement a custom drag and drop handler on a Tree I have created, and I seem to be running into a strange bug. During the dragOver event, if I set selectedIndex to the index of a node that is closed, it seems to ignore the set. When I call selectedItem after that, it always returns what should be the previously selected item, and the UI doesn't update. Here is the code I am using:

      private function dragOverEvent(event:DragEvent):void
      {
      var dropTarget:Tree = Tree(event.currentTarget);
      dropTarget.selectedIndex = dropTarget.calculateDropIndex(event);
      }

      With

      <mx:Tree dragOver="dragOverEvent(event)"</mx:Tree>

      With this code, whenever I try to drag an item onto the tree it fails if the node is closed, but works fine if the node is open. I am using Flex 3 Builder Beta 2. Does this happen for anyone else?