Bindings and the selected object
Bindings and the selected object
- Subject: Bindings and the selected object
- From: Steve Israelson <email@hidden>
- Date: Fri, 25 May 2007 13:43:54 -0700
I have a CoreData object graph of "item" entities.
I have an Array controller setup for an "item" entity.
I have a TableView bound to the controller to show all the "item"
entities.
Now, in another nib file, or maybe in a nib loaded from a plug-in, I
have an inspector that can inspect the selected "item" entity.
I need it to show the details of the item selected in the array
controller above.
I do NOT want to tightly couple these NIB's or classes at all since
the plug-ins will be written by third parties.
My idea for this is to have a SINGLE "selection" entity object that
has a reference to one of the "item" entities and have that get set
by the array controller when a selection is made.
The anyone can fetch this "selection" entity and bind to its
reference to the selected item.
This seems like an ideal solution.
The problem I am trying to figure out is how to have the array
controller set the selection reference in the "selection" entity.
I am experimenting with an Object controller to do this and it seems
like maybe it will work.
Is this the right way to go, or what? (mmalc I am looking at you :) )
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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