Re: Document-based apps interacting with main menu
Re: Document-based apps interacting with main menu
- Subject: Re: Document-based apps interacting with main menu
- From: Peter Robinson <email@hidden>
- Date: Wed, 5 Feb 2003 12:35:05 +0000
At 1:08 am -0500 5/2/03, Phillip Ulrich wrote:
Let's say I make a document-based Cocoa app. I have two nibs, my
MainMenu and MyDocument.
Now let's say I make a new menu item in the MainMenu. I want
DoSomething to affect something about MyDocument... however, it
seems impossible (like I said, I'm tired).
You should add an action to 'First Responder' in MainMenu.nib, and
connect the menu item's action outlet to that. Then, implement the
action in the document's window controller/delegate. The action
should be declared as
- (IBAction) doSomething: (id) sender;
Peter
_______________________________________________
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.