• 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: Document-based apps interacting with main menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Document-based apps interacting with main menu (From: Phillip Ulrich <email@hidden>)

  • Prev by Date: link between classes using a class variable
  • Next by Date: FW: Re : NSString to xml?
  • Previous by thread: Document-based apps interacting with main menu
  • Next by thread: Re: Document-based apps interacting with main menu
  • Index(es):
    • Date
    • Thread