I'm not actually referencing the view with the 'modelLocator.view.fields' statement. That's kind of confusing but the code is for a View Builder application so the view in that context refers to a View model class. Listening to COLLECTION_CHANGE events works fine and from reading other posts, I'm guessing is more performant? I knew there were binding issues with updates to an item within a ArrayCollection but I thought adding items worked as advertised. Anyhow, thanks for your help.
--- In flexcoders@yahoogroups.com, claudiu ursica <the_bran...@...> wrote: > > In a non related thins you shouldn't have view refereces in your model -> > modelLocator.view.fields . You could listen for the COLLECTION_CHANGE event > in the view and see it that fires when you add the item. If so you can do the > update in the handler by "hand". On the other hand if you use list based > controls in your view it kind of always works... > HTH, > C > > > > > ________________________________ > From: chefbrittison <britton.j...@...> > To: flexcoders@yahoogroups.com > Sent: Wed, February 24, 2010 3:12:32 AM > Subject: [flexcoders] Binding Issues with ArrayCollections > > > I'm using Cairngorm in a project and using Commands to update the model. > Upon adding an item to an ArrayCollection in the model, custom components > that are bound to it are not updated. It seems that bindings are only fired > upon a change of reference. Is there something I'm missing or a better way > to accomplish the same task. Any help is much appreciated. Thanks. > > //code in command > private var modelLocator: ModelLocator = ModelLocator. getInstance( ); > modelLocator. view.fields. addItem(newItem) ; >