How to configure a NSPopupButton for displaying multiple values in a TableView?
Posted
by jekmac
on Stack Overflow
See other posts from Stack Overflow
or by jekmac
Published on 2010-03-23T12:39:46Z
Indexed on
2010/03/23
12:43 UTC
Read the original article
Hit count: 197
nspopupbuttoncell
|multiple-value
|interface-builder
|many-to-many
|entity-relationship
Hi there!
I'm using two entities A and B with to-many-to-many relationship. Lets say I got an entity A with attribute aAttrib and a to-many relationship aRelat to another entity B with attribute bAttrib and a to-many relationship bRelat with entity A.
Now I am building an interface with two tables one for entity A and another for entity B. The table for entity B has two columns one for bAttrib and one for the relationship aRelat. The aRelat-column should be a NSPopupButtonCell to display multiple aAttrib values.
I'd like to set all the bindings in InterfaceBuilder in Table Column Bindings:
-- I have two NSArrayController each for one entity:
- Object Controller Mode:Entity
- Array Controller Bindings: Parameters Managed Object Context bind to File's Owner
-- One Table Cloumn with a PopUpButtonCell:
TableCloumnBindings Content bind to Entity A with ControllerKey arrangedObjects;
Content Values bind to Entity A with ModelKeyPath aAttrib
Selected Object bind to Entity B with ModelKeyPath bRelat
I know that this configuration doesn't allow multiple value setting. But I don't know how to do the right one.
Getting the following message:
HIToolbox: ignoring exception 'Unacceptable type of value for to-many relationship: property = "bRelat"; desired type = NSSet; given type = NSCFString; value = testValue.' that raised inside Carbon event dispatch...
Does anyone have any idea?
© Stack Overflow or respective owner