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

Re: NSTableView


  • Subject: Re: NSTableView
  • From: Brian Stern <email@hidden>
  • Date: Fri, 23 May 2008 16:20:42 -0400


On May 23, 2008, at 4:03 PM, john darnell wrote:

The code meant to be used in response for the requirement in the
Companion article to return the value of a given cell in the table looks
like this:



- (id) directoryTable: (NSTableView *) aTableView objectValueForTableColumn:(NSTableColumn *) aTableColumn row: (int) rowIndex

Your method name is wrong. The name of the datasource method must be: tableView:objectValueForTableColumn:row:


This is documented in the NSTableDataSource Protocol Reference and the Table View Programming Guide.

{
  NSLog(@"Row index is %d", rowIndex);

  NSString *file = [arrayOfFiles objectAtIndex:rowIndex];
  return [file self];
}


Your line return [file self] is odd. Just: return file;

--
Brian Stern
email@hidden



_______________________________________________

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


References: 
 >NSTableView (From: "john darnell" <email@hidden>)

  • Prev by Date: NSCollectionView problems
  • Next by Date: RE: NSTableView
  • Previous by thread: RE: NSTableView
  • Next by thread: Re: NSTableView
  • Index(es):
    • Date
    • Thread