• 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: First Responder and menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First Responder and menus


  • Subject: Re: First Responder and menus
  • From: mmalc crawford <email@hidden>
  • Date: Tue, 4 Jul 2006 23:11:15 -0700


On Jul 4, 2006, at 11:01 PM, Michael Ash wrote:

So it will catch problems like hooking up the action correctly, but the menu item is disabled for some other reason, but it will not catch problems such as a mismatch between the name of the action in the nib and the name of the method in the source code.

It is nevertheless likely to give an indication, "by omission", that something is awry.

For a more complete listing of what's flying around the system, implement respondsToSelector:. This can catch non-responder-chain things as well, and still won't trigger if something ahead of you in the chain responds to the action too, but it catches more cases overall.

If you want to track just responder chain issues, you can implement - (id)targetForAction:(SEL)anAction to:(id)aTarget from:(id)sender in a subclass of NSApplication. See <http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/08_CreationSheet/chapter_9_section_6.html > for an example of another situation in which this is useful.

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: First Responder and menus (From: Matt Neuburg <email@hidden>)
 >Re: Re: First Responder and menus (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: Show/Hide Toolbar Menu Item in Document-based application
  • Next by Date: Re: Show/Hide Toolbar Menu Item in Document-based application
  • Previous by thread: Re: Re: First Responder and menus
  • Next by thread: Re: First Responder and menus
  • Index(es):
    • Date
    • Thread