Applying an NSNumberFormatter to an NSTableColumn
Applying an NSNumberFormatter to an NSTableColumn
- Subject: Applying an NSNumberFormatter to an NSTableColumn
- From: "Paul N. Schatz" <email@hidden>
- Date: Sat, 5 Jul 2003 16:01:05 -0400
I read some doubles into a table and wish to format the
fourth column with dollar signs and commas.
I use the following code:
NSNumberFormatter *numberFormatter =
[[[NSNumberFormatter alloc] init] autorelease];
[numberFormatter setFormat:@"$#,##0.00"];
[[[[tableView tableColumns] objectAtIndex:3] headerCell]
setFormatter:numberFormatter];
[tableView reloadData];
This compiles and runs but has no effect whether run before
or after the numbers are entered into the table.
Where am I going wrong?
Paul
--
--
Paul Schatz
Chem Dept
University of Virginia
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.