I guess I am looking to the controller to do the event dispatching to
the model the model to listening for the result.
You don't normally do that. The controller "talks" to the model directly, so the
controller "knows" the model.
The model doesn't "know" neither view nor controller and dispatches events when
it changes.
There's some more explaning here on MSDN (1/3 down the page, under Solution):
http://msdn.microsoft.com/en-us/library/ff649643.aspx
Note that they refer to this page I posted earlier:
http://st-www.cs.illinois.edu/users/smarch/st-docs/mvc.html
----- Original Message -----
From: "Karl DeSaulniers" <k...@designdrumm.com>
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Sent: Tuesday, March 06, 2012 11:35 AM
Subject: Re: [Flashcoders] MVC style Correction
I kind of like that.
I guess I am looking to the controller to do the event dispatching to
the model
the model to listening for the result. the view listening for changes
to the model.
On Mar 6, 2012, at 4:26 AM, Cor wrote:
You could ofcourse take another approach:
In the view:
dispatchEvent(new Event(View.YOURVIEWEVENT));
and in the Contoller:
View.addEventListener(View.YOURVIEWEVENT, callback);
So there is a loose coupling as Paul wrote.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders