Filter values of a combo box bound to an array's content?

Hello everyone,

So far I have been pretty successful with bindings in IB, and I have to admit this thing is pure genius… I was curious as to how far this thing can be brilliant with the following situation:

I have bound the content values of a combo box to one key path of array’s controller, and as such the full name appears as a selection. But I would like to push this further by filtering the value by department, all with bindings if possible. I know how to do it with code, but I’d prefer to simplify the code and learn at the same time… :slight_smile:

In my interface I have 4 combo boxes with the content values bound the same way, but each one is a different department, but without any filtering, any staff member appears in all four. Is is possible to filter by an integer, from 0 to 3, each representing a department?

Right now the Controller key is set to arrangedObjects, and the Model Key Path is set to completeName, and Value Transformer is empty.

Also, I have seen somewhere that there were pretty cool tricks that can be done with controller keys and model key paths, like @max, @avg, etc… did anyone saw information on this, or a tutorial? I’d like to exploit this further… Looked through the Xcode docs and google, but this is really difficult to search for…

Thanks!

Browser: Safari 531.22.7
Operating System: Mac OS X (10.6)

Search for predicates, and the Predicate Programming Guide. Look for the section Using Predicates with Cocoa Bindings.