Yeah, but that's not going to update immediately when the field changes, is it?

The NSArrayController doco mentions:

"When you detect that filtering criteria change (such as when listening to the 
text sent by an NSSearchField instance), invoke this method on self."

What is the correct way to listen to changes on NSSearchField in order to 
re-trigger filtering?

--- On Fri, 8/22/08, Timothy Larkin <[EMAIL PROTECTED]> wrote:

> From: Timothy Larkin <[EMAIL PROTECTED]>
> Subject: Re: filter Predicate - NSArrayController
> To: [EMAIL PROTECTED]
> Date: Friday, August 22, 2008, 12:38 PM
> I usually do something like this.
> 
> NSString *key = [searchField stringValue];
> NSPredicate *predicate = [NSPredicate
> predicateWithFormat:@"title ==  
> %@", key];
> 
> Then
> 
> [arrayController setFilterPredicate:predicate];
> 
> triggers the binding.
> 
> The "==" operator is strict equality. You can
> make the comparison case- 
> insensitive using "like[c]".
> 
> 
> --
> Timothy Larkin
> Abstract Tools
> Caroline, NY


      
_______________________________________________

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]

Reply via email to