Re: Filtering a table view using NSSearchField
Re: Filtering a table view using NSSearchField
- Subject: Re: Filtering a table view using NSSearchField
- From: "Sean McBride" <email@hidden>
- Date: Wed, 16 Sep 2009 12:00:50 -0400
- Organization: Rogue Research Inc.
On 9/16/09 7:22 AM, PCWiz said:
>I found a very simple way to do this. Just bind the NSSearchFields
>"predicate" binding to the Array Controllers filterPredicate key. Then
>change the Predicate Format to "myKeyPath contains[c] $value" where
>myKeyPath is the key path in the array controller that you want to
>filter from. This worked for me. good luck!
You might want to make that "myKeyPath contains[cd] $value" so that the
search is also diacritic-insensitive, which is usually what you want.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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