binding NSSearchField to an NSArrayController
binding NSSearchField to an NSArrayController
- Subject: binding NSSearchField to an NSArrayController
- From: email@hidden
- Date: Sat, 18 Dec 2010 20:19:18 -0500
I can't seem to get the NSSearchField bindings to work properly for searching items in an NSTableView (whose columns are bound to an NSArrayController).
I have an NSArrayController and its array contains Student objects. Student has a property named last that is the last name and displays in a column of the NSTableView.
In the Search bindings of the NSSearchField, I bind to the NSArrayController, set the Controller Key to filterPredicate, set the Display Name to Last, but I can't figure out what to put in the Predicate Format (or if I need a Model Key Path) setting.
I've tried: last contains $value
but I get the error:
Exception detected while handling key input.
Can't use in/contains operator with collection LAST (not a collection)
I've tried: last like $value
but I get no errors and no filtering when I press the enter key.
What should I be doing to get the search to work?
Thanks,
Dave
_______________________________________________
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