Re: Help to understand how do events work
Re: Help to understand how do events work
- Subject: Re: Help to understand how do events work
- From: Murat Konar <email@hidden>
- Date: Thu, 7 Oct 2010 10:53:32 -0700
On Oct 6, 2010, at 10:00 PM, eveningnick eveningnick wrote:
> Do keyDowns come only to those applications which have a keyWindow
> displayed on a screen?
You'll only get keydowns if
1) Your app is the active application
2) Your window is key
3) Your view is in the window's responder chain.
4) Some other view ahead of yours in the chain didn't swallow up the key event.
> How do popup menus usually process keydown events? are they also "key windows" in cocoa
> terminology?
Menus shortcuts are handled differently than "regular" key events.
You're asking sort of basic questions. Do yourself a favor and get this book:
<http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/0321503619/ref=ntt_at_ep_dpi_2>
It's really good for folks trying to get up to speed. You'll want to read up on Responder chains.
_murat
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden