Pregunta

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.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top