• 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
binding NSSearchField to an NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: UTI for ScreenSaver, Automator Actions and PreferencePanes?
  • Next by Date: NSTextView scrolls to top on Save
  • Previous by thread: Re: UTI for ScreenSaver, Automator Actions and PreferencePanes?
  • Next by thread: NSTextView scrolls to top on Save
  • Index(es):
    • Date
    • Thread