Re: Unexpected behavior of NSNumberFormatter
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