I think that will give you two ArrayCollections which share the same
data items. For example, if you do
 
arrayCollection.setItemAt("foo", 0);
trace(arrayCollection2.getItemAt(0));
 
you'll probably get "foo".
 
- Gordon

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Holmes
Sent: Thursday, April 19, 2007 8:34 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Call by value instead of Call by reference
when copying ArrayCollection



No loop required. Just create a new array collection with the source of
the old array collection.

arrayColletion2 = new ArrayCollection(arrayCollection1.source);

b..

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of manfred.maierhofer
Sent: Wednesday, April 18, 2007 11:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Call by value instead of Call by reference when
copying ArrayCollection

Hey guys,
is there a way to "copy" an ArrayCollection instead of referencing it
by ArrayCollection1 = ArrayCollection2;???

I can't believe that there is no way to do this, except cophying each
value in a loop.

Thanks,
Mane

________________________________

***
The information in this e-mail is confidential and intended solely for
the individual or entity to whom it is addressed. If you have received
this e-mail in error please notify the sender by return e-mail delete
this e-mail and refrain from any disclosure or action based on the
information.
*** 

 

Reply via email to