Skip navigation.
 
mlNSPopUpButtonCell NSDecimalNumber and locale
FROM : Cocoa
DATE : Thu Jul 03 22:52:19 2008

Hello,

I encounter a problem with an NSPopUpButtonCell in a NSTableView

The column containing this cell is binded to an 
NSUserDefaultsController (for Content and Content Values keys), 
@"Selected Value" is stored using coredata and a property with a 
decimal attribute

The values of the nsuserdefaultscontroller are nsdecimalnumber

I want to show localized values in the popupbuttoncell menu ie: 10.45 
=> 10,45

The popupbuttoncell only show values with the american format: using 
the . as decimal separator

This is the same thing if i use an nsnumberformatter for this 
tablecolumn with setLocalizesFormat set to YES or if i use an 
nsarraycontroller instead of an nsuserdefaultscontroller where values 
are created using decimalNumberWithString: locale:

Is there a way to force NSPopUpButtonCell to use localized values ?

Thank You

Stéphane

Related mailsAuthorDate
No related mails found.