Hello, list. I am a hack programmer, so forgive what is probably an
obvious question. I'm working on a core data document based app that
uses bindings I've created in IB to control a master / detail
interface. Briefly, in XCode's xcdatamodel, there is a Person entity
with a name (String) and employee (Bool). I have another entity,
Transaction, which has an amount (Decimal) and an operator (Person
Relationship). So far, so good. Everything is nicely working with
bindings. However, I only want the operator pop-up to display Person
entities for which employee == 1 (the predicate that I can build in
the xcdatamodel fetch request).
I would have thought that, in IB, I should be able to choose the pop-
up button binding, set the Content binding to the Person array
controller, set the controller key to filterPredicate, and choose the
keyPath to be the pre-made fetch called getEmployees that I created in
the xcdatamodel. It seems like that would simply limit the content to
records that fit the predicate. Needless to say, this doesn't work,
since at compile time, the console shows this:
2009-11-14 09:47:15.190 iCredit v0.1[7370:a0f] Binding contentValues
of object <NSPopUpButton: 0x103328aa0> ignored: Key path (currently
bound as arrangedObjects.firstName) needs to have the content key path
(filterPredicate.getEmployees) as prefix
What should I have done, or can this be achieved with IB at all? I'm
not opposed to writing the code to populate the NSPopUpButton object
by hand, but bindings seem so right for this purpose that I can't seem
to get past this hangup. Thanks for any insight!
-Dan
_______________________________________________
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