Re: Two controllers in a window, how do I get one to run a function in another?
Re: Two controllers in a window, how do I get one to run a function in another?
- Subject: Re: Two controllers in a window, how do I get one to run a function in another?
- From: bryscomat <email@hidden>
- Date: Thu, 27 Aug 2009 09:15:23 -0500
The solution I'd recommend is in Cocoa Bindings.
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/CocoaBindings.html
A view controller per view is a good idea. For some more samples on
that, you can look at KTUIKit.
http://katidev.com/blog/ktuikit/
I'd written something very similar before I stumbled on this. You can
use different nibs for each view, and once you master bindings across
different nibs, it seems to me to be perfect MVC.
On Aug 27, 2009, at 8:55 AM, Support wrote:
I'm writing an application which has one window, with an NSTableView
and a WebView in it. The NSTableView will contain a list of URLs
and site descriptions and the WebView will display the URL when it's
clicked on in the NSTableView. So far, so simple - especially if
the NSTableView and WebView are in the same object.
I want to have two NSObjects (controllers) - one for the tableview
and all the actions that it needs to perform, and one for the web
view. I am having difficulty getting the tableview controller to
tell the webview controller to display a particular page. And I
can't find anything about this subject in my Cocoa books or on the
web. Am I barking up the wrong tree here? Should I only have one
controller per window?
I'd be most grateful for any enlightenment.
_______________________________________________
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-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