flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark goldin <markzolo...@gmail.com>
Subject Re: Monitor collection change
Date Wed, 29 Apr 2015 19:18:06 GMT
<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 <aharui@adobe.com> 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" <markzolotoy@gmail.com> 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
>
>

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