Filtering a table view using NSSearchField
Filtering a table view using NSSearchField
- Subject: Filtering a table view using NSSearchField
- From: PCWiz <email@hidden>
- Date: Mon, 14 Sep 2009 17:36:57 -0600
Hi,
I'm trying to filter a NSTableView using the contents of an
NSSearchField. I have an Array Controller and table columns bound to
key paths in the array controller. So for example I have the table
column for name is bound to Array Controller.arrangedObjects.name.
Everything up to this point is working fine, as the table view is
populated with info correctly and all. What I want to do now is filter
the contents of the table view (based on the name column) using text
typed into an NSSearchField. So if the user types "test" into the
search field, then anything row that doesn't contain "test" in its
name gets removed.
I know this is somehow possible using bindings and predicates, but im
not sure exactly how to do it.
Any guidance would be appreciated :-)
Thanks
_______________________________________________
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