Re: actions between nibs
Re: actions between nibs
- Subject: Re: actions between nibs
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 9 Apr 2003 23:24:58 -0700
On Wednesday, April 9, 2003, at 10:41 PM, Chaz McGarvey wrote:
I have a document-based Cocoa app. I want menu actions (MainMenu.nib)
to go to my document class (MyDocument.nib). It would be a lot easier
if I could control click and connect the menu item to the File's Owner
in my document nib, but it doesn't work across different nibs. So how
else is this done?
Take a look at First Responder and the Responder Chain:
<file:///Developer/Documentation/Cocoa/TasksAndConcepts/
ProgrammingTopics/BasicEventHandling/Concepts/AboutRespChain.html>
Briefly (and loosely speaking), if you connect a menu item in your
MainMenu nib to First Responder (you can add custom methods to FR in
IB); the action event for any methods defined in MyDocument will be
routed to the appropriate instance.
mmalc
_______________________________________________
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.