Design Dilemma ...
Design Dilemma ...
- Subject: Design Dilemma ...
- From: SA Dev <email@hidden>
- Date: Tue, 21 Jun 2005 15:22:33 -0400
List:
I've got a bit of a design dilemma. Don't worry, it's Cocoa-
related. I'm representing a list of Actions. An Action can be a Query
or an Order (as in 'ordering to do something'). All Actions have a
'response'. Questions have one SET LIST of responses. All Orders have
a *SEPARATE* SET LIST of responses. A Query and an Order are two
different objects in a number of other ways as well (otherwise, I'd
just have an 'actionType' property and call it a day).
In my window, I have a table view that represents *all* actions. I
want to have a popup cell type in the "Response" column that allows
the user to select the response type from the popup's menu (showing
only the list of response types based on the type of action in that
row). I don't want to have to have a master / detail view for Actions
as it's meant to be a flat report look (a project requirement made by
the pointy-hair types, unfortunately).
I've already defined all the response types as a simple NSNumber.
If all Actions had the same response types, I could simply create a
prototype popup cell and populate it with the text representations of
the fixed list of response types.
The approach I have in mind is to create an empty popup prototype
at runtime and use tableView:willDisplayCell:forTableColumn:row: to
swap out the available menu choices. The problem is, I think this
won't work because the cell is reused for every row, I'd be changing
the choices in *all* cells. So how do I do this?
I'm using bindings for everything else and would love to be able
to use them for this situation as well, but I can't for the life of
me figure out how to accomplish that.
Or is my whole approach doomed? Let me know if any of the above is
unclear; I'd be happy to elaborate or clarify.
Thanks!
_______________________________________________
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