• 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: Help to understand how do events work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Help to understand how do events work (From: eveningnick eveningnick <email@hidden>)
 >Re: Help to understand how do events work (From: "email@hidden" <email@hidden>)
 >Re: Help to understand how do events work (From: eveningnick eveningnick <email@hidden>)

  • Prev by Date: Re: reused tableViewCell UILabel text is deallocated but not nil ??
  • Next by Date: Re: Help to understand how do events work
  • Previous by thread: Re: Help to understand how do events work
  • Next by thread: Re: Help to understand how do events work
  • Index(es):
    • Date
    • Thread