I don't know if that is indeed the best practice but for now if it suit your needs just do it. The main idea is that the model drives the view, and at the same time it represent the current state of the up. Having a view bound to that model makes the view display the current state for the app. Now you either do it by bindings or
by your own implementation of the observer pattern it is up to you. That implementation of the observer in there helps you prevent silent failures, otherwise flex bindings should do just fine. I'm not sure this is what you expected to hear, and I am sorry if I cannot be more helpful. We had an app once an we used a custom error class to handle all the messages/erros in the up (something like model.error.doError()) which handled both the messages and their displaying triggering. It did just fine, dunno if it was the best way to do it, but it worked... Claudiu ________________________________ From: lampei <lam...@gmail.com> To: flexcoders@yahoogroups.com Sent: Sunday, January 11, 2009 4:00:59 PM Subject: [flexcoders] Re: Cairngorm and ChangeWatcher That's actually the example I've been using (I thought it was 2006, not 2007), but it's 2 years old, and my question still holds. Is this the best practice or is some other method being used with Cairngorm? --- In flexcod...@yahoogro ups.com, claudiu ursica <the_braniak@ ...> wrote: > > http://weblogs. macromedia. com/auhlmann/ archives/ 2007/02/creating _a_popu.html# more > > This should give you some directions.. . > > Claudiu > > > > > ____________ _________ _________ __ > From: lampei <lam...@...> > To: flexcod...@yahoogro ups.com > Sent: Saturday, January 10, 2009 1:34:25 AM > Subject: [flexcoders] Cairngorm and ChangeWatcher > > > I have begun tinkering around with various frameworks and thought I > would start with Cairngorm. I am refactoring a small application to > use Cairngorm, but ran into a snag. All of the examples I found just > bound an item in the view to a property of the ModelLocator, and thus > automagically updated the value when the property of the ModelLocator > changed. However, I had one item that is waiting for a response from > a service, and needed to respond to that change (such as an error > message), rather than just display the updated data that is returned. > > I found an example that uses the ChangeWatcher class to watch the > property on the ModelLocator. This seemed to work fine, but I was > wondering if this is still best practice, as the example I found was > from 2006. > > Thanks. >