0 Replies Latest reply on Nov 21, 2008 8:53 PM by Me, of couse

    Problem with child objects created in custom tree data descriptor

    Me, of couse
      I have a set of AS objects that must be represented in a tree. Some of them are branches with various numbers of children while some are leaves. The branches can have additional branch or leaf children. One type of node in particular, let's call them Elephant objects, is causing me grief. Elephants contain one array of Chicken objects and a second array of Monkey objects. I must represent the set of Chickens and Monkeys as sub-folders of their parent Elephant object rather than listing all of the Chickens and Monkeys as individual children of the Elephant. I have been trying to solve this problem by creating new children objects on the fly from within the getChildren function of an ITreeDataDescriptor implementer class, which I've attached to this message.

      The problem I encountered is that the Chicken and Monkey branch/folder objects that I create on the fly and add to the tree will not open, though they appear in the tree as expected. Is creating objects and adding them to a tree in the getChildren function bad? I hope there's something obvious that I'm doing wrong.