Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopUpButton and Bindings - using code and description



I have a NSPopUpButton for selecting a state. I have a table that has stateCode and stateName that I want to use to build the popupList and have an object that contains/drives the selected state code. What I'd like to do is somehow store the stateCode but display the associated stateName.

Using bindings, I have selectedValue bound to myObject.stateCode, have content bound to stateList. I can then bind contentValue to stateList.stateCode and my popup works, but displays the code. Is there a way through bindings to have the display tied to one key, but the stored value tied to a different key of the same object?

Alan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.