• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Applying an NSNumberFormatter to an NSTableColumn
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Applying an NSNumberFormatter to an NSTableColumn
      • From: Boaz Stuller <email@hidden>
  • Prev by Date: Re: Filenames with Umlauts
  • Next by Date: Re: Applying an NSNumberFormatter to an NSTableColumn
  • Previous by thread: Re: Big Binary Files in PB
  • Next by thread: Re: Applying an NSNumberFormatter to an NSTableColumn
  • Index(es):
    • Date
    • Thread