Mon 14 Mar 2011 08:28:23 PM UTC, comment #4:
I'll try to implement this with the libicu stuff, shouldn't be much of a problem. I can't promise it'll make it into the next release, but I'll give it a shot. Could you attach the expected output? I see a similar test in the testsuite, but it doesn't test for the -1.01 value, which I find more interesting than 0.00. Also, can you double check that the output of -formatterBehavior is in fact NSNumberFormatterBehavior10_4?
|
Thu 17 Feb 2011 12:17:40 AM UTC, comment #2:
The current code of trunk makes a segfault:
0xb71c6063 in -[NSNumberFormatter setDecimalSeparator:] (self=0x905da18,
_cmd=0xb74237b8, newSeparator=0x9180bd8) at NSNumberFormatter.m:647
647 if (internal->_behavior == NSNumberFormatterBehavior10_4
(gdb) bt
#0 0xb71c6063 in -[NSNumberFormatter setDecimalSeparator:] (self=0x905da18,
_cmd=0xb74237b8, newSeparator=0x9180bd8) at NSNumberFormatter.m:647
#1 0xb71c5a2d in -[NSNumberFormatter initWithCoder:] (self=0x905da18,
_cmd=0xb7417c08, decoder=0x9149c70) at NSNumberFormatter.m:483
#2 0xb71a5271 in -[NSKeyedUnarchiver(Private) _decodeObject:] (
self=0x9149c70, _cmd=0xb7417bc8, index=228) at NSKeyedUnarchiver.m:220
#3 0xb71a35e8 in -[NSKeyedUnarchiver decodeObjectForKey:] (self=0x9149c70,
_cmd=0xb77e3108, aKey=0xb77e32f0) at NSKeyedUnarchiver.m:602
#4 0xb75765aa in -[NSCell initWithCoder:] (self=0x91e6fa8, _cmd=0xb77c4a10,
aDecoder=0x9149c70) at NSCell.m:2575
#5 0xb752120e in -[NSActionCell initWithCoder:] (self=0x91e6fa8,
_cmd=0xb785c390, aDecoder=0x9149c70) at NSActionCell.m:379
#6 0xb768b30e in -[NSTextFieldCell initWithCoder:] (self=0x91e6fa8,
_cmd=0xb7417c08, aDecoder=0x9149c70) at NSTextFieldCell.m:329
#7 0xb71a5271 in -[NSKeyedUnarchiver(Private) _decodeObject:] (
self=0x9149c70, _cmd=0xb7417bc8, index=227) at NSKeyedUnarchiver.m:220
#8 0xb71a35e8 in -[NSKeyedUnarchiver decodeObjectForKey:] (self=0x9149c70,
_cmd=0xb77f1608, aKey=0xb77f16a0) at NSKeyedUnarchiver.m:602
#9 0xb7598109 in -[NSControl initWithCoder:] (self=0x8f7cfa0,
_cmd=0xb785b7b0, aDecoder=0x9149c70) at NSControl.m:965
#10 0xb7689b7e in -[NSTextField initWithCoder:] (self=0x8f7cfa0,
_cmd=0xb7417c08, aDecoder=0x9149c70) at NSTextField.m:757
#11 0xb71a5271 in -[NSKeyedUnarchiver(Private) _decodeObject:] (
(gdb) po newSeparator
.
|
Sat 12 Feb 2011 05:17:25 PM UTC, comment #1:
Actually the string being converted is very simple, 0.00
I think the problem is that [self decimalSeparator] returns null.
In fact, adding a quick hack to always return @"." to decimalSeparator makes the NIB load although with some unexpected parameters.
|