• 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: what class responds the MainMenu?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what class responds the MainMenu?


  • Subject: Re: what class responds the MainMenu?
  • From: Jerry Seeger <email@hidden>
  • Date: Mon, 22 Sep 2003 13:25:53 -0700

Most menu commands are sent to First Responder. Cocoa goes through a hierarchy of objects until it finds one that responds to the message the menu item sends. There are some exceptions (for instance, font menu items are sent to the Font Manager, which subsequently sends a message to First Responder.)

Your document controller for the document in the frontmost window is in the response chain, so if no other object ahead of it in the chain accepts the message, the document controller will get it. It will be far more reliable for you to read up on the response chain than for me to try to describe it in more detail here.

Jerry


On Monday, September 22, 2003, at 08:33 AM, serty2 wrote:

hi,
I have a question I think is very simple :
what class does respond the MainMenu when you click on a menu item in a document based app ?

is it NSDocumentController or a subclass of it (if you set that properly in IB of course)?

Thanks for any answer ;)

Damien
_______________________________________________
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.
_______________________________________________
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: 
 >what class responds the MainMenu? (From: serty2 <email@hidden>)

  • Prev by Date: Re: Declaring large (but not that large) array causes crash?
  • Next by Date: Re: Objective-C Question
  • Previous by thread: what class responds the MainMenu?
  • Next by thread: NSTableView with textbox
  • Index(es):
    • Date
    • Thread