Answered: How do I bind ManagedObject's relationships to a view?
Answered: How do I bind ManagedObject's relationships to a view?
- Subject: Answered: How do I bind ManagedObject's relationships to a view?
- From: Daniel Wambold <email@hidden>
- Date: Thu, 3 Dec 2009 19:55:47 -0500
I'm posting this simply because I *thought* I had looked through all
of Apple's "bindings for beginners"-style documentation, but hadn't
seen this sort of dependent controller setup described. Sorry if it's
obvious or redundant....
In the spirit of (finally) answering my own question (and in case
anyone else was baffled by this), I was able to bind successfully the
"dependent" list of "authorized users" (authUsers), which are person
entities to an NSTableView by creating a new NSArrayController in IB,
setting its Mode to Entity, its Entity Name to the entity that it
would display (in this case, for example, my person entity), then
setting the Content SET binding to the NSArrayController that managed
the complete account entity, with the Controller Key set to selection,
and the model path to authUsers, which was a relationship that is the
inverse of a person's account relationship. Then, I could bind the
NSTableViewColumn to the new controller by selecting the
NSTableViewColumn and setting its Value binding to the new controller,
its Controller Key to arrangedObjects, and the model key path to the
read-only (synthesized on the fly through code) key path, nameAndID. I
haven't tried to use the Content Set binding without creating the
dependent controller, so I don't know if that would work in some way
by using just the "main account" controller I have....
Best Regards,
Dan
_______________________________________________
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