On my popup button I'm trying to figure out how to get/select via a property of the object. I have a 'Producer' core data entity, and it has a name (String) and ident (Int) value. I want to show the name, but get/set the selection based on ident.
What I have right now is that the name shows, but the selection is based on the entire entity object, not just the ident. How do I make that work?
My NSArrayController is like so:
- Mode: Entity Name
- Entity Name: Producer
- Managed Object Context binding set to the view controller
My NSPopupButton is set like so:
- Content Array: bound to arrangedObjects of Array Controller
- Content Values:
- Bind to: Array Controller
- Controller Key: arrangedObjects
- Model Key Path: name
- Selected Object:
- Controller Key: empty
- Model Key Path: producer