Re: model->controller messaging
Re: model->controller messaging
- Subject: Re: model->controller messaging
- From: Koen van der Drift <email@hidden>
- Date: Thu, 5 Jun 2003 18:38:29 -0400
>
Notifications. Uncouple the model from any controller. This way you can
>
hook up more than one controller (say for two different views of your
>
data) that will detect when something changes.
>
>
Mike
>
>
On Wednesday, June 4, 2003, at 10:37 PM, Sean Harding wrote:
>
>
> What's the accepted best practice for communicating from a model
>
> object to a controller object? Controller to model is easy because the
>
> controller creates the model. Is there any reason not to pass the
>
> model a pointer to the controller and let it freely send messages > back?
So, how does this work in the case when an app has both a model-controller
and a view-controller? Should both controllers register for notifications
of the model, or should the model-controller notify the view and vice-versa?
In this case, the model-controller is an NSDocument, and the
view-controller is an NSWindowController.
thanks,
- Koen.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.