Skip navigation.
 
mlPredicate in IB
FROM : Micha Fuhrmann
DATE : Fri Apr 27 12:50:42 2007

Hi there,

I can't get the predicate working in IB. The predicate in the Class 
is working fine since I'm creating an filtered test array within the 
class, but in IB it doesn't do as expected. I've done a tiny project 
covering the issue, I would be grateful if someone could take a look.

All the doc I've found is a couple of lines in the Predicate 
Programming Guide:

"You can set a predicate for an array controller to filter the 
content array. You can set the predicate in
code (using setFilterPredicate:). You can also bind the array 
controller's filterPredicate
binding to a method that returns an NSPredicate object. The object 
that implements the method may
be the File's Owner or another controller object. If you change the 
predicate, remember that you must
do so in a key-value observing compliant way (see Key-Value Observing 
Programming Guide) so that
the array controller updates itself accordingly.
You can also bind the predicate binding of an NSSearchField object to 
the filterPredicate of an
array controller. A search field's predicate binding is a multivalue 
binding, described in Binding
Types."

I haven't found any examples either, not really clear, to me at least.

As a side I'm finding working with Bindings in IB difficult. When 
residing within xCode/Classes, the contours are clear, mixing IB's 
Bindings and it gets blurry.

May be it's just me... anyway the project can be downloaded at

http://homepage.mac.com/michaf/FileSharing64.html

It must be a little tweak I've missed, again, would be grateful for 
someone shedding light.

Regards,

Micha

Related mailsAuthorDate
mlPredicate in IB Micha Fuhrmann Apr 27, 12:50
mlRe: Predicate in IB Romain Apr 27, 15:13
mlRe: Predicate in IB Micha Fuhrmann Apr 27, 16:37