Re: Reset/Cancel an NSSearchField
Re: Reset/Cancel an NSSearchField
- Subject: Re: Reset/Cancel an NSSearchField
- From: Matt Neuburg <email@hidden>
- Date: Thu, 21 Jun 2007 12:25:31 -0700
- Thread-topic: Reset/Cancel an NSSearchField
On Thu, 21 Jun 2007 11:59:35 +1000, Steve Steinitz
<email@hidden> said:
>Hello,
>
>With Matt helping me manage my expectations :), I was able to confirm
>that the following does indeed change the NSSearchField's visible cell
>string:
>
>> [[theSearchField cell] setStringValue: @"test"];
>
>However, now I can't work out how to make it 'trigger' the search.
What you call a search field's "trigger" is what Cocoa calls its "action".
Responding to the action is up to you. For some possible approaches, see my
"Thucydides" application with sample code. In the case of NSArrayController
you would presumably respond by changing its filter predicate. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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