I guess the behavior is consistent with the docs after all. In my test
I was just tracing out the collections after the update, which makes
sense that it would be shown. Moving back into my application, I
discovered that to see the updated value(s) in a DataGrid bound to the
second collection you need to call itemUpdated() on it, which is
consistent with the docs.

So my apologies, nothing to see here, move along... :)



--- In [email protected], "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> In my tests, changing an element of one AC definitely does affect the
> other (which is what I hoped), but looking at the documentation I
> can't tell if that should be the case. From the docs: "The
> ArrayCollection object does not represent any changes that you make
> directly to the source array. Always use the ICollectionView or IList
> methods to modify the collection. "
> 
> I am using the ICollectionView methods, but only on one of the
> ArrayCollections, and the only way the second ArrayCollection is being
> affected is that its source array is being modified. If you run this
> simple example, you'll see that arr, ac1 and ac2 are all updated with
> the new value:
> 
> arr = new Array({fn: "David", ln: "Bowie"}, {fn: "Jimi", ln:
"Hendrix"});
> ac1 = new ArrayCollection(arr);
> ac2 = new ArrayCollection(arr);
>                               
> ac2.getItemAt(1).fn = "Bozo";
> 
> If anyone can provide any clarification it would be greatly appreciated.
> 
> TIA,
> Ben
>


Reply via email to