• 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
Re: NSTableView with NSArray and C-array question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView with NSArray and C-array question


  • Subject: Re: NSTableView with NSArray and C-array question
  • From: Glenn Zelniker <email@hidden>
  • Date: Fri, 13 Oct 2006 11:27:47 -0400


On Oct 13, 2006, at 11:20 AM, Gilles Celli wrote:

Here my:

- (id)tableView:(NSTableView *)tableView objectValueForTableColumn: (NSTableColumn *)Column row:(int)Row

if ( [[Column identifier] isEqualToString:@"1"])
	{
		return [NSNumber numberWithDouble:[k2700 channel:0]];
	}
	else if ( [[Column identifier] isEqualToString:@"2"])
	{
		return [NSNumber numberWithDouble:[k2700 channel:1]];
	}
	else if ( [[Column identifier] isEqualToString:@"3"])
	{
		return [NSNumber numberWithDouble:[k2700 channel:2]];
	}
	.....
....
}

You're ignoring the value of Row. Remember -- this is a data-source method, which means your code is being asked to provide the object value for the indicated table column at the indicated row. The code above returns the same value for each column *regardless* of the table row. I'm assuming that you're trying to display in your table the data for a number of sensors (indicated by a column) at different points in time (indicated by row position). Is this correct?


GZ

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTableView with NSArray and C-array question
      • From: Gilles Celli <email@hidden>
References: 
 >NSTableView with NSArray and C-array question (From: Gilles Celli <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: "Mark Munz" <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Gilles Celli <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Glenn Zelniker <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Gilles Celli <email@hidden>)

  • Prev by Date: NSScroller customization
  • Next by Date: Re: NSTableView with NSArray and C-array question
  • Previous by thread: Re: NSTableView with NSArray and C-array question
  • Next by thread: Re: NSTableView with NSArray and C-array question
  • Index(es):
    • Date
    • Thread