• 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: Disabling NSNumberFormatter rounding?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling NSNumberFormatter rounding?


  • Subject: Re: Disabling NSNumberFormatter rounding?
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 29 Apr 2009 14:08:34 -0600


On Apr 27, 2009, at 1:10 PM, Nick Zitzmann wrote:

I have an NSNumberFormatter (10.4 behavior) attached to an NSTextField, and I'm setting the text field's object value to an NSDecimalNumber that can be of any length. But when I load in an NSDecimalNumber that is at least 16 digits long (e.g. 1234567890123456), the NSNumberFormatter is rounding up the number's last digit (e.g. 1234567890123460) when the number is displayed on screen. The objectValue of the text field is not rounded.


Well, apparently nobody knew the answer, but it's OK, since I figured out a solution: Change the formatter behavior to 10.0 behavior, and the rounding no longer occurs. I doubt this will break anything, since I'm working with older code I didn't write, that I think was written for the old behavior anyway...

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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


References: 
 >Disabling NSNumberFormatter rounding? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Group Identity Programming
  • Next by Date: Re: File Reading Problems
  • Previous by thread: Disabling NSNumberFormatter rounding?
  • Next by thread: RED Camera SDK wrapper?
  • Index(es):
    • Date
    • Thread