Re: fundamental question: how do I call controller methods from other classes?
Re: fundamental question: how do I call controller methods from other classes?
- Subject: Re: fundamental question: how do I call controller methods from other classes?
- From: "Sherm Pendley" <email@hidden>
- Date: Thu, 22 May 2008 17:19:20 -0400
I've no idea what books you've been reading or what questions you've been
asking, but MVC as it applies to Cocoa is pretty well described on this
page:
<
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/chapter_5_section_4.html
>
Which, of course, is just a small part of the Cocoa Fundamentals Guide:
<
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/chapter_1_section_1.html
>
sherm--
On Thu, May 22, 2008 at 5:05 PM, Matthew Youney <email@hidden> wrote:
> Ahhhhhhhh! This is quite interesting. Have I been reading the wrong
> books,
> asking the wrong questions or both? This can be quite a powerfull tool!
> Again, thanks,
> Matt
>
>
>
> On 21 May '08, at 8:15 PM, Matthew Youney wrote:
>
> > I just have no mechanism of sending messages
> > to my "controller" class from my "model" objects unless the
> > "controller"
> > makes the call.
>
> Typically the model doesn't "know about" the controller (or the view).
> Instead it posts notifications when it changes, and the controllers/
> views listen for those. That's what key-value observing is designed
> for, or you can use NSNotifications. (Look either of those up in the
> overview docs if you need details.)
>
> This separation helps keep the model abstract and reusable. It also
> makes it easier to handle multiple views of the same data, as happens
> with multi-window or splittable UIs, as well as inspector panels.
>
> -Jens
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden