NSSearchField does not work as expected

I am trying to follow Marcus Zarra in his book Basic Data. In the book he makes a small sample application, but he does not give much help when something fails ...

He begins by visualizing the three entities, and then adds the array controllers for each object to the main nib. Secondly, it adds a tableview and some other visual components to display data from the array controllers.

So far I have managed to follow, but now it adds a search field to gui and associates it with the same array controller as one of the table views. The expected behavior would be for the tableview to receive filtering as you type in the search field, but nothing happens.

How to find out what is wrong?

The relevant parts from niba are as follows:

NSArrayController Recipes
  - Mode = Object
  - Enitity Name = Recipe

TableView with TableColumn
  - Recipe binding value
    - Controller key = hosted objects - File path - name

Search field
  - Predicate is bound to recipes
   - Control key = filterPredicate
   - Model key path = name
   - Display name = predicate
   - Predicate Format = keyPath contains the value $

There are no corresponding messages in the console.

Regards,
-Vegar

+3
source share
1 answer

. , :

name contains[c] $value
+9

Source: https://habr.com/ru/post/1739519/


All Articles