• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Filtering a table view using NSSearchField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: How to observe every child entity
  • Next by Date: NSNumber bound to NSTextField
  • Previous by thread: Overriding managedObjectContext for a new Persistent Document
  • Next by thread: Re: Filtering a table view using NSSearchField
  • Index(es):
    • Date
    • Thread