Binding search field and table view in cocoa

I have nstableview. I would like to filter the results based on the characters entered in the search bar in OSX. So, how do I bind the table view and search box in OSX not in IOS? :) Thanks.

+5
source share
1 answer

I have a project that you can download and see how it works.

Steps:

  • Drag NSArrayController, set all the bindings with this. Create an NSSearchField.

  • In the required inspector, find "Bind to ArrayController".

  • Set the controller key to "filterPredicate".

  • "property1 $value". , (, 3), || as: "property1 $value || property2 $value || 3 $value"

, fooobar.com/questions/1143551/....

+6

All Articles