Re: NSSearchField - detect loss of focus
Re: NSSearchField - detect loss of focus
- Subject: Re: NSSearchField - detect loss of focus
- From: Matt Neuburg <email@hidden>
- Date: Fri, 06 Jan 2006 10:16:48 -0800
- Thread-topic: NSSearchField - detect loss of focus
On Fri, 6 Jan 2006 23:26:17 +1100, Keith Wilson <email@hidden>
said:
>I have an NSSearchField in my toolbar and the results of the search
>are displayed in an NSTableView - very similar to the way it works in
>OSX 10.4 in the search field in the Apple System Preferences panel.
>
>After searching the user can
>(a) select an item from the NSTableView or
>(b) click anywhere else on the screen to indicate that they are no
>longer interested in the search results.
>
>For case (b) how do I detect when the NSSearchField loses keyboard
>focus - so that I can then hide the NSTableView?
Override resignFirstResponder? Actually I have to admit that, faced with
similar situations, what I generally do is to catch the windowDidUpdate
notification; these are sent whenever anything changes, including change of
focus, so you can check for the firstResponder and react accordingly. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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