• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
coreData+bindings+IB challenge.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coreData+bindings+IB challenge.


  • Subject: coreData+bindings+IB challenge.
  • From: email@hidden
  • Date: Fri, 30 Jan 2009 15:25:42 -0500

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 (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Stroking "on the inside" with NSBezierPath
  • Next by Date: Re: Stroking "on the inside" with NSBezierPath
  • Previous by thread: Re: Stroking "on the inside" with NSBezierPath
  • Next by thread: Printing WebView as a subview
  • Index(es):
    • Date
    • Thread