On Jan 4, 2010 5:15pm, Saurabh Sharan <saurabh.sha...@isharan.com> wrote:
You're not alone -- happened to me too. Though, when I downloaded the code from pragprog.com, it worked.

- Saurabh

On Sun, Jan 3, 2010 at 10:11 PM, lorenzo7...@gmail.com> wrote:

I'm going the Zarra book, "Core Data" and I;ve reached the section where an NSSearchfield is bound to one of the arrays used in the sample application (page 43). As instructed in the book, I configured the NSSearchfield's predicate binding as follows:


Controller Key: filterPredicate

Model Key Path: name

Display Name: predicate

Predicate Format: keyPath contains $value



This did not work and the NSTableView (column) which should update itself from the NSArrayController does nothing.

I found an example of this sort of thing here:

http://homepage.mac.com/mmalc/CocoaExamples/controllers.html



and found that the binding in the second predicate used for the NSSearchfield is configured like this:

Controller Key: filterPredicate

Model Key Path :

Display Name: Last Name

Predicate Format: lastName contains[cd] $value



I configured my predicate binding fashion and it works. So my question is:

Did I miss something in the book, or is the book wrong?

Thanks

_______________________________________________



Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)



Please 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/saurabh.sharan%40isharan.com



This email sent to saurabh.sha...@isharan.com






Thanks for the reply. The downloadable code differs from the book as well:
Controller Key: filterPredicate
Model Key Path:
Display Name: Recipe Name <--- Here is one difference, book uses 'predicate'
Predicate Format: name contains[c] $value <--- Here is another, book uses 'keyPath contains $value'

This works. So, if not anything else, I know of two ways to do this now.
Thanks again.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to