• 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: Any way to detect firstResponder changes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to detect firstResponder changes?


  • Subject: Re: Any way to detect firstResponder changes?
  • From: Keary Suska <email@hidden>
  • Date: Tue, 11 Nov 2008 10:27:09 -0700


On Nov 11, 2008, at 9:31 AM, Uli Kusterer wrote:

On 11.11.2008, at 17:04, Ken Tozier wrote:
I have a custom NSView subclass that contains, among other things, an NSTableView and need to know when focus changes happen so I can highlight the the view correctly. I tried setting up a KVO observer on NSWindw's "firstResponder", but it appears that windows don't report this change.


I think NSWindow sends an NSNotification in that case. At the least, it would send a method to its delegate.


I don't believe this is the case, except maybe for the field editor notification, but that wouldn't fire in all cases. windowDidUpdate: may be sent, but probably really often so the method needs to be pretty efficient.

Another option--just theorizing, as I have never done it--may be to subclass NSWindow and overrride -selectNextKeyView:, – selectPreviousKeyView:, and/or -makeFirstResponder:.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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: 
 >Any way to detect firstResponder changes? (From: Ken Tozier <email@hidden>)
 >Re: Any way to detect firstResponder changes? (From: Uli Kusterer <email@hidden>)

  • Prev by Date: RE : a newbie question
  • Next by Date: Re: Play/Pause, rew/ff keys ...
  • Previous by thread: Re: Any way to detect firstResponder changes?
  • Next by thread: RE : Any way to detect firstResponder changes?
  • Index(es):
    • Date
    • Thread