[flexcoders] How to efficiently copy a filtered and sorted ArrayCollection?

2008-03-04 Thread m.ar80
I have to make copy of a filtered and sorted array collection.
Iterating over the source array of the first collection and then
adding each item iterated to the second collection is not an efficient
way of doing it because each item added is re-filtered and re-sorted
in the new collection even though its filter status and sorted
position is already known in the first collection. Is there any better
way of doing this? Thanks.



RE: [flexcoders] How to efficiently copy a filtered and sorted ArrayCollection?

2008-03-04 Thread Alex Harui
Collection2.source = collection1.toArray()

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of m.ar80
Sent: Tuesday, March 04, 2008 4:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to efficiently copy a filtered and sorted
ArrayCollection?

 

I have to make copy of a filtered and sorted array collection.
Iterating over the source array of the first collection and then
adding each item iterated to the second collection is not an efficient
way of doing it because each item added is re-filtered and re-sorted
in the new collection even though its filter status and sorted
position is already known in the first collection. Is there any better
way of doing this? Thanks.