• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Two controllers in a window, how do I get one to run a function in another?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Two controllers in a window, how do I get one to run a function in another? (From: Support <email@hidden>)

  • Prev by Date: Re: Two controllers in a window, how do I get one to run a function in another?
  • Next by Date: Re: Best way to determine what ip address are assigned to a given network interface.
  • Previous by thread: Re: Two controllers in a window, how do I get one to run a function in another?
  • Next by thread: Best way to determine what ip address are assigned to a given network interface.
  • Index(es):
    • Date
    • Thread