• 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: event/notification for focus?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: event/notification for focus?


  • Subject: Re: event/notification for focus?
  • From: Luc Vandal <email@hidden>
  • Date: Thu, 07 Apr 2005 12:26:06 -0400

I don't even understand why it's so difficult to be notified that the focus has switched to another control... To me it's a pretty basic thing that should've been included in the API as an event (onFocus) or a notification (NSFocusChanged). :)

If anyone has a code snippet to share it would really be appreciated!

Luc


On 7-Apr-05, at 11:58 AM, Ricky Sharp wrote:


On Thursday, April 07, 2005, at 10:52AM, Luc Vandal <email@hidden> wrote:


and how do you check which control has focus? I know that there's
focusView that returns the control that has focus but it doesn't seem
available through [self window];

As I mentioned in a previous message, be careful when finding APIs to work with 'focus'. focusView is used to determine which view has "window and coordinate system" focus (see lockFocus).


In order to see if a particular view is the first responder, check out the recent replies to this thread. I believe someone mentioned that you should not only check the owning window's firstResponder, but also if that window is currently key.

--
Rick Sharp
Instant Interactive(tm)

_______________________________________________ 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
  • Follow-Ups:
    • Re: event/notification for focus?
      • From: Shawn Erickson <email@hidden>
    • Re: event/notification for focus?
      • From: j o a r <email@hidden>
References: 
 >event/notification for focus? (From: Luc Vandal <email@hidden>)
 >Re: event/notification for focus? (From: Mike Ferris <email@hidden>)
 >Re: event/notification for focus? (From: Luc Vandal <email@hidden>)
 >Re: event/notification for focus? (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Meeting - Boston / Pittsubrgh CocoaHeads April 14
  • Next by Date: REST API & Cocoa Programming
  • Previous by thread: Re: event/notification for focus?
  • Next by thread: Re: event/notification for focus?
  • Index(es):
    • Date
    • Thread