• 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: Unexpected behavior of NSNumberFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unexpected behavior of NSNumberFormatter


  • Subject: Re: Unexpected behavior of NSNumberFormatter
  • From: Nick Müller <email@hidden>
  • Date: Sun, 30 Dec 2001 13:58:58 +0100

On 28.12.2001 at 13:24 Uhr, Chris Kane wrote:

> (Actually, it's "only formatters which are unarchived" get
> localized, so presumably one could archive a formatter to NSData,
> and unarchive the data (without dealing with the file system), to
> get a localized formatter.)

This helps a bit. But as soon as it is archived and unarchived again,
all changes are lost.

Just for the one who will fix it, not for complaining:
- Also the rounding seems to be buggy. Rounding-behavior claims to not
limit the number of digits after the decimal point, but it does (to 2
digits).
- NSDecimalNumberHandler does not respond to NSCoding. If you replace
the rounding behavior by your own,
(NSNumberFormatter:setRoundingBehavior) and try to archive the
NSNumberFormatter, you will miss NSCoding.
- I'm also missing some set-functions in the NSDecimalNumberHandler. The
NMSDecimalNumberBehavior-protocol only allows reading.


I get the best results, if I create a NSNumberFormatter, set
localization (may be this might be left out), archive/unarchive it and
make my changes.



> Apple has a bug on this.

At least one. :-)

Thanks,
Nick
.........................................
logic tools

WebObjects // Web Authoring // Perl
Nick Mueller // Muenchen // Germany


  • Follow-Ups:
    • Re: Unexpected behavior of NSNumberFormatter
      • From: Thomas Lachand-Robert <email@hidden>
References: 
 >Re: Unexpected behavior of NSNumberFormatter (From: Chris Kane <email@hidden>)

  • Prev by Date: Re: menubar rect
  • Next by Date: Setting a file's icon
  • Previous by thread: Re: Unexpected behavior of NSNumberFormatter
  • Next by thread: Re: Unexpected behavior of NSNumberFormatter
  • Index(es):
    • Date
    • Thread