flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak MS <megharajdee...@gmail.com>
Subject Re: Rookie ArrayCollection Question
Date Thu, 29 Sep 2016 06:33:25 GMT
var arr:Array = ObjectUtil.copy(compArrayCollection.toArray()) as Array;
Comps.dataArrayCollection = new ArrayCollection(arr);

On Thu, Sep 29, 2016 at 12:01 PM, Deepak MS <megharajdeepak@gmail.com>
wrote:

> try this:
>
> Comps.dataArrayCollection = (ObjectUtil.copy(compArrayCollection.toArray())
> as Array);
>
> On Thu, Sep 29, 2016 at 11:41 AM, bilbosax <waspence41@comcast.net> wrote:
>
>> Thanks again for the help Justin.  Have another question for you regarding
>> ArrayCollections.  My main app loads an ArrayCollection from a service.  I
>> then pass it to an ArrayCollection in a component by a simple assignment:
>>
>> Comps.dataArrayCollection = compArrayCollection;
>>
>> So I am setting the dataArrayCollection in my Comps component to the
>> values
>> in my compArrayCollection in the main app.  What is weird though is that
>> whenever I change any values in the dataArrayCollection, they are also
>> changing back in my compArrayCollection back in the main app.  I don't
>> want
>> this to happen, I want their values to be independent of one another once
>> the values are passed.  Is there any way to make this not happen?
>>
>> Thanks,
>> Bill
>>
>>
>>
>> --
>> View this message in context: http://apache-flex-users.23333
>> 46.n4.nabble.com/Rookie-ArrayCollection-Question-tp13649p13662.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message