• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Localized decimal point
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localized decimal point


  • Subject: Re: Localized decimal point
  • From: Stéphane Sudre <email@hidden>
  • Date: Wed, 2 Apr 2003 11:48:21 +0200

On Tuesday, April 1, 2003, at 09:36 PM, kubernan wrote:

Hello,

This is the first i have this problem and the archive don't respond to
it.
I don't understand why suddenly i have to enter 0,45 instead of 0.45
in my software (untouched since 10.2.3).

if i use :
[myTextField setStringValue:[[NSNumber numberWithDouble:0.45]
stringValue]];

the value appears as 0.45 in the GUI.
But if i try :
NSLog(@"Value of myTextField : %f", [myTextField doubleValue]);

The result is 0.00000. This is wrong of course.

Now is i type the value 0,45 (local french decimal representation)
i now have 0.45 displayed (english format) using NSLog....

The question is why it seems i have to setup a localization now ?
How i can do that quickly (this is not a production software) for
working in
english representation ?

Is there a NSNumberFormatter attached to the NSTextField?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Localized decimal point (From: kubernan <email@hidden>)

  • Prev by Date: Image with dynamic background color and text in table
  • Next by Date: Re: Rendering an NSControl into a NSImage?
  • Previous by thread: Re: Localized decimal point
  • Next by thread: Right way to load initial data in controls when opening a window
  • Index(es):
    • Date
    • Thread