hey guys,
got a coreData+Bindings+IB challenge that I just can't figure out. The apple docs and the obligatory search of the various channels of dev data has yielded zip.

so to boil it down to a clear and simple as it can be...

I have 2 entities : entA and entB.
entA has a to-many relationship to entB, called: entBRelationship. (with appropriate inverse)
entB has a numerical attribute named: "order"

I have a master detail interface, works great. it consists of :
a tableview bound to an arrayController in turn bound to entA entities.
a tableView bound to an arrayController in turn bound to the entBRelationship of the Selection of entA's list.

like I said: works great.
heres what doesn't work, what I can't find any documentation that even hints at how to do it, or any reference anywhere that even talks about trying something remotely like this: I have a text field. I want to bind it in IB, to the entB whose order == 1, of the EntBRelationship, of the selected entA.

that sounds like I should have an ObjectController with a filter predicate (@"order == 1")bound to the same arrayController that my second tableView is bound to. that "SHOULD" fetch the singular object in the array that fits the fetch predicate. bzzzt. nope, doesn't work. it returns a set. (in an OBJECT CONTROLLER?????)

or an arrayController, with a filter predicate... nope, another NSSet is returned.

I subclassed NSArrayController and added a method of "object:" to it which returns the object of index:0 of the arranged objects, and then bound the text field to THAT, but guess what happened there? the KVC was messed up, my text field never updated, even though it allowed me to change the value of the object. unnacceptable, and not really helpful. I need to be able IN IB to set the search predicate.

can anyone shed some light on how to use IB, to bind to a singular ManagedObject based upon a predicate?

can anyone shed any light on the fact that ObjectControllers appear to have No utility whatsoever, because they cannot be bound to objects in an arrayController's arrangedObjects array?

can anyone tell me why IB drops the inspector for the selected controller when I apply bindings? its a bug, its unavoidable, it SEEMS like it would be trivial to fix compared to most bugs, and its been around for over a year!

peace,
-td



_______________________________________________

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