• 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
NSTableView & Multiple Columns
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView & Multiple Columns


  • Subject: NSTableView & Multiple Columns
  • From: Robb <email@hidden>
  • Date: Sun, 18 Jul 2010 19:32:48 -0400

I'm trying to setup a table view with multiple columns, but I can't figure out how to identify any particular column.
what does [tablecolumn identifier] actually return so i can compare it?  I assumed a string, but that didn't work.  So my questions is, what do I do with the NSTableColumn thats being passed to me?

Here is the method so far:

- (id) tableView:(NSTableView *) tv
ObjectValueForTableColumn:(NSTableColumn *) tc
			 row:(int) index
{
	if ([tc identifier] == @"Integer") {
		return [integerArray objectAtIndex:index];
	}
	if ([tc identifier] == @"Cube") {
		return [cubeArray objectAtIndex:index];
	}
	if ([tc identifier] == @"Square") {
		return [squareArray objectAtIndex:index];
	}
}_______________________________________________

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

  • Follow-Ups:
    • Re: NSTableView & Multiple Columns
      • From: Graham Cox <email@hidden>
    • Re: NSTableView & Multiple Columns
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Encrypting data in a Core Data SQL store for a Mac desktop app
  • Next by Date: Re: HTTP Pipe lining communication in iPhone application
  • Previous by thread: Re: NOAA data feeds
  • Next by thread: Re: NSTableView & Multiple Columns
  • Index(es):
    • Date
    • Thread