--- In [email protected], "Fotis Chatzinikos" 
<fotis.chatzini...@...> wrote:
>
> Depends on your style / preferences... XML might be easier to 
handle but
> arrays are much faster to wire and compute..
> 
> I use the following array based structure , where parent helps 
upward tree
> traversal (children contains CategoryTree instances):
> 
>     public class CategoryTree
>     {
>         public var label:String ;
>         public var children:ArrayCollection ;
>         public var parent:CategoryTree;
>    }

I think maybe you're arguing with Tracy in your reply to me :-).  I 
was suggesting that you use objects with a children property that's 
an ArrayCollection.  You then cast the top level ArrayCollection or 
Object to HierarchicalData and cast that to 
HierarchicalCollectionView and use getParentItem() to retrieve a 
reference to the parent from the child.

I, personally, think it's a little "icky" to store a reference to an 
object higher in the hierarchy (that hence contains a reference to 
this object that has a reference to the parent...), so I think I'd 
probably feel a bit suicidal if forced to do so.  :-)

But hey, whatever works.

-Amy

Reply via email to