Re: First Responder and menus
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