On 17 Jul '08, at 10:45 AM, Andy Lee wrote:

I'd add a (BOOL)handleMyKeyDown: method in a category of NSObject, and override keyDown: in NSApplication to traverse windows, delegates (perhaps including control delegates), and descendant views until something returns YES.

Well, if I'm going to subclass, I'll just subclass NSWindow and handle the event there. I wasn't posting because I didn't know how to do it; rather, because it seems awkward (and atypical of Cocoa) that you have to subclass something to get the event; especially since my window delegate is already in the responder chain. I thought maybe I was overlooking a simpler way to do it by delegation.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to