On 25 Jan 2007, at 22:49, David Ayers wrote:
Graham J Lee schrieb:
I still haven't been able to duplicate that. Maybe if you're
going to
FOSDEM we could meet up and have a mini-hackfest to see WTF is
happening :-)
The issue was not a bug in NSNumberFormatter. It was a bug in the
implementation of NSDecimalNumber
- (id) initWithBytes: (const void*)value objCType: (const char*)type
which called:
[[NSString alloc] initWithFormat: @"%g",v];
instead of
[[NSString alloc] initWithFormat: @"%g"
locale: GSPrivateDefaultLocale(), v];
It's just that due to the missing tests for NSDecimalNumber, the issue
didn't show up in the test suite until the tests for the formatter
where
added.
Ah, OK. I'm happy to write a few more tests for [NG]SDecimalNumber.
If you could send me some examples of things you found broken which
are fixed by your patch or by Richard's fixes, I'll incorporate those
to avoid dupliacting them myself ;-)
[...] My patch proposal tries to handle most of the
other types that could be passed to the method. And it also tries to
handle INF and NAN double and float values better. But I must admit
that I do not have a Cocoa reference implementation to verify whether
Cocoa handles INF/NAN "correctly".
OK, I tend to run tests on both Cocoa and GS to look for differences,
so I'll check into that anyway. Again, any example you already have
cooked up for this would be welcome ;-)
Cheers,
Graham.
P.S. I think we definitely could do with NSLocale for formatting and
so forth. I think I could implement this for POSIX-esque systems so
will give it a go; having no clue HTF Windows i18n works I will avoid
offering a cross-platform solution though ;-). But, having never
implemented a GS class from scratch before, especially one which
isn't part of the OpenStep specification: any copyright/left
pitfalls? Any API-matching @interface of a Cocoa class is obviously
going to look remarkably similar to an Apple header file, is using
their API documentation and writing my own header file from scratch
appropriate?
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev