Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

knightlie

macrumors 6502a
Original poster
Feb 18, 2008
546
0
I always have trouble getting a grasp of NSPopupButton bindings. Here's my scenario:

I'm setting the currencyCode property of a Core Data object to a three-letter currency code. I use an NSPopupButton to do this with an array of codes bound to Content, but I want the popup menu to show the currency names. Based on the answer here I've tried using an NSDictionary where currencyCode=currencyName, but I get an error along the lines of "Binding contentObjects of object <NSPopUpButton: 0x20043cda0> ignored: Key path (currently bound as arrangedObjects.key) needs to have the content key path (arrangedObjects.value) as prefix".

I tried using an intermediate CurrencyCode class holding a code and a name, but the three-letter code in the Core Data entity then has nothing to bind to.

I feel like I'm missing an obvious answer to this, but I always hit a snag when binding popup buttons.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.