The problem:
I currently have a model that has properties bound to my view (a datagrid 
populated from an arraycollection, call it myModel.acUsers).  The 
arraycollection is populated from a remote object call.  However, if I set 
listeners on that ArrayCollection, once the remote call returns the data, and I 
set it to the arraycollection, the original listener I had set on the 
arraycollection gets removed, correct?

In diving into the ListCollectionView, I saw that when the source gets set, it 
fires the "listChanged" event, so I can do a myModel.acUsers.source = ( 
event.results as ArrayCollection ).source and the event fires, and my original 
listeners do not get removed.  The "listChanged" event is different than the 
ListEvent.CHANGE event though.  So 2 questions:
1) Is this the best way to do this (I always have trouble listening for events 
on arraycollections when returning the values from remote calls so I can 
perform an action once the data is returned)
2) Is there a specific event set up for "listChanged" (such as 
ListEvent.LIST_CHANGED) or do I just need to continue listening for it like 
myModel.acUsers.addEventListener( "listChanged", handleListChanged ) ?

Thanks

Reply via email to