I found a solution to get round the bug...but still consider that the tree component has a bug.
--- In flexcoders@yahoogroups.com, "gdoucen" <[EMAIL PROTECTED]> wrote: > > Hi, > > I have found any subjects on this so.. > > I want to apply a text filter to leaves of a tree. All the branches > that do not have leaves after this filter must be hidden (for this i > apply another filter that tests the number of children each branch > still have). > > It works as long as all the branches still have at least one item > displayed otherwise as soon as i try to expand/collapse a branch, this > error is generated: > > TypeError: Error #1010: A term is undefined and has no properties. > at mx.controls:: > Tree/expandItem()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\Tree.as:1740] > at mx.controls:: > Tree/http://www.adobe.com/2006/flex/mx/internal::expandItemHandler()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\Tree.as:3149] > at flash.events:: > EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() > at flash.events:: > EventDispatcher/dispatchEvent() > at mx.core:: > UIComponent/dispatchEvent()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:8323] > at mx.controls:: > Tree/http://www.adobe.com/2006/flex/mx/internal::dispatchTreeEvent()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\Tree.as:3065] > at mx.controls.treeClasses:: > TreeItemRenderer/mx.controls.treeClasses:TreeItemRenderer::disclosureMouseDownHandler()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\treeClasses\TreeItemRenderer.as:479] > > > Have u got any idea to avoid this error ? any help would be appreciated. > > Thanks >