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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]