Question

I have two different NSArrayControllers but I'd like to use the text of one search field to filter them both. The predicate would be different for each controller. Is it possible? Right now I can only get it to filter one array controller at a time.

Was it helpful?

Solution

YES this is possible.

You can do it as : This Stack Overflow answer by me shows how to do for one table and ArrayController.

For multiple you just need to add a new predicate, which will say as Predicate2. Please refer the screen shot:

Here Teacher and Student class contains a property name. However yo can have different property name. Also I am filtering only on one column or property you can search it for multiple columns/properties, for this refer the above link.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top