Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Predicate in IB



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
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.