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 = 'griffen';

Object(myCollection[0]).obj = obj;

-TH

--- In [email protected], "timgerr" <tgallag...@...> wrote:
>
> I want to add it as a child to the first item in the arraycollection
(myCollection[0]). Can this be done???
>
> Thanks,
> timgerr
>
> --- In [email protected], "Tim Hoff" TimHoff@ wrote:
> >
> >
> > Have you tried myCollection.addItemAt(obj,0);?
> >
> > -TH
> >
> > --- In [email protected], "timgerr" <tgallagher@> wrote:
> > >
> > > I want to add items to an arraycollection as a child
> > >
> > >
> > > --- In [email protected], "timgerr" tgallagher@ 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 = new ArrayCollection([{first:
> > 'Matt', last: 'Matthews'}, {first: 'Tom', last: 'Jones'}]);
> > > >
> > > > var obj:Object = new Object();
> > > > obj.first = 'lisa';
> > > > obj.last = 'griffen';
> > > >
> > > > I would like to add the new object to be a child of the first
item
> > in the array list. Can this be done??
> > > >
> > > > Thanks,
> > > > timgerr
> > > >
> > >
> >
>


Reply via email to