Re: [flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread Charles Parcell
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=62&productId=2 or http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=cellrenderer_072_37.html and a nice little bonus feature if you like... http://blog.fl

[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread Tim Hoff
When I say XML, I mean XMLListCollection. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Honestly, if you're looking to create a hierarchical structure, for use > in a tree control, you would be better searved using XML. The way you > are setting up your ArrayCollection, you wou

[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread timgerr
That did it, now how do you get the text to change color in your code here in the Groups??? thanks, timgerr --- In flexcoders@yahoogroups.com, Charles Parcell wrote: > > Going out on a limb here but try changing the one line of code that injects > an child object to... > > Object(myCollection

[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread Tim Hoff
Honestly, if you're looking to create a hierarchical structure, for use in a tree control, you would be better searved using XML. The way you are setting up your ArrayCollection, you would have to add additional collections as children of your items. This is much easier, and works better with tr

Re: [flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread Charles Parcell
Going out on a limb here but try changing the one line of code that injects an child object to... Object(myCollection[0]).children= obj; Charles P. On Fri, May 8, 2009 at 3:04 PM, timgerr wrote: > Thanks for the response, I have a question about arraycollection and > trees. If I do this: >

[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread timgerr
Thanks for the response, I have a question about arraycollection and trees. If I do this: var myCollection:ArrayCollection = new ArrayCollection([{first: 'Matt', last:'Matthews'}, {first: 'Tom', last: 'Jones'}]); var obj:Object = new Object(); obj.first = 'lisa'; obj.last = 'griffen'; Object(my

[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread Tim Hoff
Ah, ok. The first item in the arrayCollection is an Object. So, you would have to do something like this: var myCollection:ArrayCollection = new ArrayCollection([{first: 'Matt', last:'Matthews'}, {first: 'Tom', last: 'Jones'}]); var obj:Object = new Object(); obj.first = 'lisa'; obj.last = 'gr

[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread timgerr
I want to add it as a child to the first item in the arraycollection (myCollection[0]). Can this be done??? Thanks, timgerr --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Have you tried myCollection.addItemAt(obj,0);? > > -TH > > --- In flexcoders@yahoogroups.com, "timgerr" wr

[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread Tim Hoff
Have you tried myCollection.addItemAt(obj,0);? -TH --- In flexcoders@yahoogroups.com, "timgerr" wrote: > > I want to add items to an arraycollection as a child > > > --- In flexcoders@yahoogroups.com, "timgerr" tgallagher@ wrote: > > > > Hello all, > > I have a question for you all. I was wonde

[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread timgerr
I want to add items to an arraycollection as a child --- In flexcoders@yahoogroups.com, "timgerr" wrote: > > Hello all, > I have a question for you all. I was wondering how I can add a child to an > object within a arraycollection. Here is what I mean: > var myCollection:ArrayCollection = ne