Hi, > 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.
Not weird at all what you have is two array collections that contains references to the same objects, if you change one then other one will also changes. Code like this: var ac:ArrayCollection = new ArrayCollection(someArray); or this: var ac:ArrayCollection = new ArrayCollection(otherAC.source); Will make a shallow copies like this. > 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? In that case you need to duplicate or deep copy the objects one way to do this is this: var ac:ArrayCollection = new ArrayCollection(ObjectUtils.copy(otherAC.source) as Array); But realise you now have doubled the memory needed to store everything. Thanks, Justin
