On 4/29/15, 12:38 PM, "João Fernandes"
<[email protected]> wrote:

>Any change within items in this arrayCollection will result in a
>CollectionChangeEvent so you don't have to track items individually, just
>listen to the event on the ArrayCollection as Alex mentioned.

That is true, I forgot about that, but one warning: it assumes the data
objects are dispatching propertyChange events, and I think it also assumes
the object are flat.  I’m not sure it will pick up changes to properties
of sub-objects.

-Alex

>
>On 29 April 2015 at 20:18, mark goldin <[email protected]> wrote:
>
>> <Probably easier to do
>>addEventListener(CollectionEvent.COLLECTION_CHANGE).
>> Add it to what? To ArrayCollection? And how can I listen to each
>>element in
>> this collection?
>>
>> On Wed, Apr 29, 2015 at 1:39 PM, Alex Harui <[email protected]> wrote:
>>
>> > Probably easier to do
>> addEventListener(CollectionEvent.COLLECTION_CHANGE).
>> >
>> > That will pick up changes to the collection, but not to properties in
>> > object in the collection.  To do that, you will need to listen to each
>> > object in the collection.
>> >
>> > -Alex
>> >
>> > On 4/29/15, 9:35 AM, "mark goldin" <[email protected]> wrote:
>> >
>> > >I have an ArrayCollection. I need to monitor changes made to it by a
>> user.
>> > >I am trying something like this:
>> > >aWatcher = ChangeWatcher.watch(_model.selectedPoints, "Selected",
>> > >validateSaveState);
>> > >
>> > >private function validateSaveState(event:CollectionEvent):void
>> > >{
>> > >trace(event);
>> > >}
>> > >
>> > >But I am not really getting into validateSaveState when selected
>> property
>> > >is changed.
>> > >
>> > >Please give me some ideas.
>> > >
>> > >Thanks
>> >
>> >
>>
>
>
>
>-- 
>
>João Fernandes

Reply via email to