0 Replies Latest reply on Jan 15, 2007 8:45 AM by tiagoafpereira

    Delete tree node error

    tiagoafpereira
      On the "Flex Quick Starts: Building an advanced user interface", "Working with Tree controls", "Add and remove leaf nodes at run time" there is an error.

      If you remove one employee from Engineering, the last folder, and then update the tree state (for instance, close the folder) the app will crash and report this error:

      TypeError: Error #1010: A term is undefined and has no properties.
      at mx.controls::Tree/expandItem()
      at mx.controls::Tree/ http://www.adobe.com/2006/flex/mx/internal::expandItemHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.controls::Tree/ http://www.adobe.com/2006/flex/mx/internal::dispatchTreeEvent()
      at mx.controls.treeClasses::TreeItemRenderer/::disclosureMouseDownHandler()

      The app won't respond any further after this, but removing any other employee from the other folders results in no error.
      I am using that same method used in "removeEmployee()" and I am yet to find a solution for it... any help would be great.

      Tiago