Using a valuetransformer in a popupmenu
Using a valuetransformer in a popupmenu
- Subject: Using a valuetransformer in a popupmenu
- From: Eli Bach <email@hidden>
- Date: Tue, 9 Mar 2010 15:11:47 -0700
I have a core data application, with an NSArrayController with the managedobjects I want to display in an NSPopupMenu.
I can get the popup to display a specific attribute of each object [like attributeX, say] by binding the content to the controller.arrangedObjects and binding content values to controller.arrangedObjects.attributeX
But I would like to use a generated value based on multiple fields of the object.
But adding an NSValueTransformer [either registered or unregistered] to the Content Values binding, it doesn't get called [if it's bound to either controller.arrangedObjects.attributeX or controller.arrangedObjects.self].
Am I doing this wrong or should I just implement an accessor for the managedobject that generates the string from the multiple fields [which mixes the model and the view, but I'll probably do this just to move forward until I can find the 'right' way to do it].
Eli
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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