That method you linked to in your blog seems a little bulky.

Duplicated here:

# private function copyArrayCollection(src1:ArrayCollection,
# src2:ArrayCollection):ArrayCollection{
# var dest:ArrayCollection = new ArrayCollection();
# if(src1 != null && src1.length > 0){
# for(var i:int = 0; i<src1.length; i++){
# src2.addItem(src1.getItemAt(i));
# }
# }
# dest = src2;
# return dest;
# }

 Wouldn't this do the same thing without reimplementing the function?

# var ac1:ArrayCollection = new ArrayCollection( [1, 2, 3, 4] );
# var ac2:ArrayCollection = new ArrayCollection( ac1.source.concat() );



On 1/14/08, ezderman <[EMAIL PROTECTED]> wrote:
>
>
> http://flexed.wordpress.com/2006/12/21/copy-2-arraycollections/
>
> --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> "jovialrandor" <[EMAIL PROTECTED]>
> wrote:
> >
> > I want to copy a certain property (companyInfo2.RELATED_ASSET_ID)
> of
> > one arraycollection to another arraycollection (asset_id).
> >
> > how do I go about that?
> >
> > here is what I have:
> >
> > [Bindable]
> > private var companyInfo:ArrayCollection;
> >
> > [Bindable]
> > private var companyInfo2:ArrayCollection;
> >
> >
> > private function sanDataHandler2(event:ResultEvent):void
> > {
> > companyInfo2 =
> > sanData2.lastResult.ASSETS.ASSET.RELATIONSHIPS.RELATIONSHIP;
> >
> > plname = sanData2.lastResult.ASSETS.ASSET.DESC;
> >
> > for (var y:int=0; y<companyInfo2.length; y++){
> > companyInfo2[y].RELATED_ASSET_ID == asset_id[y];
> > y++;
> > }
> >
>
>  
>



-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com

Reply via email to