Grouping separator not working in table
Grouping separator not working in table
- Subject: Grouping separator not working in table
- From: Steve Nicholson <email@hidden>
- Date: Mon, 2 Feb 2009 17:22:06 -0800
I'm having trouble getting grouping separators to show up in a table
view. In IB, I've assigned a number formatter to a table column's text
field cell and set up the formatter with grouping size 3 and turned on
Grouping Separator. In tableView:objectValueForTableColumn:row: I'm
returning an NSNumber that contains a double value. I put a breakpoint
in tableView:objectValueForTableColumn:row: to examine the formatter.
Here's my debugger transcript (bendingArray is the array that holds
the NSNumbers):
(gdb) p (int)[[bendingArray objectAtIndex:3] intValue]
$5 = 7424
(gdb) p (double)[[bendingArray objectAtIndex:3] doubleValue]
$6 = 7424.1557647460277
(gdb) p (int)[[[aTableColumn dataCell] formatter] numberStyle]
$7 = 0
(gdb) p (int)[[[aTableColumn dataCell] formatter] usesGroupingSeparator]
$8 = 1
(gdb) p (int)[[[aTableColumn dataCell] formatter] formatterBehavior]
$9 = 1040
(gdb) p (int)[[[aTableColumn dataCell] formatter] groupingSize]
$10 = 3
(gdb) po [[aTableColumn dataCell] formatter]
<NSNumberFormatter: 0x1018380>
I also tried setting Number Style to Decimal in IB. It gave me three
decimal places but still no grouping separator. I set the grouping
size to 2. IB shows "1,23" in the table but there is still no
separator when I run the program.
Is there a setting other than the ones I looked at in the debugger I'm
overlooking?
Thanks,
-Steve
_______________________________________________
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