How to bind this situation?
How to bind this situation?
- Subject: How to bind this situation?
- From: John Timmer <email@hidden>
- Date: Sun, 11 Sep 2005 09:02:26 -0400
Let me describe my object graph:
An item contains a set of "holding" objects. The holder contains a
reference to one of a user-defined set of descriptor objects, which has a
set of options. The holder also has a variable that references which one of
those options the user chose. There are corresponding links back so that
notifications about changes can be propagated back (key/value observing
would crash the app on undo).
Item -- set --> holder ---------> description
<--------- | <-- set -- |
| |
chosen option -------> options
Here's the problem: There's a table view that lists all the items. I'm
getting requests to allow the user to add columns for some of the descriptor
items that would display the chosen option (it seems most sensible to make
this as a popup menu of all available options, so the users can change the
option while in list view).
I can figure out how to create a new table column and a popup menu cell and
bind the menu options to the description's options. The problem I have is
how to bind the chosen option. A given item may or may not have a reference
to a given holder.description, and it may have dozens of holders all
pointing to different descriptions. Given an array controller filled with
items, how do I select the right holder for the column, which is bound to
the description?
Any advice would be appreciated,
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden