• 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 11:50:20 -0400

Thanks!

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];

Thanks!

Luc


On 7-Apr-05, at 10:41 AM, Mike Ferris wrote:

The closest thing out of the box is to listen for NSWindowDidUpdate and look for changes to keyWindow and firstResponder of keyWindow yourself...

As others mentioned, subclassing either views or windows could also be done to add this sort of notification. But I usually find that just watching for NSWindowDidUpdate and checking if the focus has changed is easier.

Mike Ferris

_______________________________________________ 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: Ricky Sharp <email@hidden>
References: 
 >event/notification for focus? (From: Luc Vandal <email@hidden>)
 >Re: event/notification for focus? (From: Mike Ferris <email@hidden>)

  • Prev by Date: Re: GNU GPL Controller Layer for Sets
  • Next by Date: Re: ADC Core Data article
  • Previous by thread: Re: event/notification for focus?
  • Next by thread: Re: event/notification for focus?
  • Index(es):
    • Date
    • Thread