Re: Files owner vs MyController
Re: Files owner vs MyController
- Subject: Re: Files owner vs MyController
- From: Sherm Pendley <email@hidden>
- Date: Sun, 25 Apr 2004 16:40:56 -0400
On Apr 25, 2004, at 4:19 PM, Ken Tozier wrote:
Another related question is that it doesn't seem possible to assign
actions to menu items. Intuitivatively, selecting a menu item is an
action so I would think that when wiring it up to either the
controller or the files owner, that the direction would flow from the
menu item to the controller, but that doesn't seem to be possible.
Menu actions are most often sent to the "Responder Chain" rather than
to a specific object. In IB this means connecting them to "First
Responder" instead of "Nib's Owner". Programatically it means passing
nil to setTarget:.
If you want a window controller to respond to menu selections when its
window is the key and/or main window, make the controller the window
object's delegate.
More details about event handling and the responder chain are here:
<
http://developer.apple.com/documentation/Cocoa/Conceptual/
BasicEventHandling/index.html>
sherm--
_______________________________________________
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.