Re: Connecting menu item to controller in different nib
Re: Connecting menu item to controller in different nib
- Subject: Re: Connecting menu item to controller in different nib
- From: Ondra Cada <email@hidden>
- Date: Wed, 24 Jul 2002 17:34:39 +0200
On Wednesday, July 24, 2002, at 05:08 , Matthew Roberts wrote:
The main menubar is, of course, defined in the MainMenu nib. My problem
is
that I want to connect one of that nib's menu items to an action on the
document's controller (which is the "File's Owner" object in the nib
window).
Ouch. Generally, check docs and archives, this very question is in both...
Well: connect the item(s) to the First Responder, and make sure the
document controller understands the message. The rest (that always the
controller of the main window is the one who gets the message if the menu
item is selected) is ensured by White Cocoa Magic (if interested how the
magic works, study NSResponder.html and NSDocument/Controller.html).
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.