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;
   }

On Thu, Dec 18, 2008 at 2:13 AM, Amy <amyblankens...@bellsouth.net> wrote:

>   --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, ivo
> <cervantes_v...@...> wrote:
> >
> > I worked on something similar not too long ago and my approach for #1
> was to load top-level folders only and only drill inward with a server
> call as the user clicks on the expand arrow on individual folders. It
> made it appear more responsive for huge structures.
> >
> > For #2 you can have each of your nodes be an object with a 'children'
> member that is an ArrayCollection of node objects. When
> inserting/removing you operate on the children ArrayCollection directly
> and the Tree will reflect the change on the next screen update.
>
> This has the advantage that you can cast this to
> HierarchicalCollectionView, which makes it really easy to get back from
> child to parent.
>
>  
>



-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,

Reply via email to