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

NSTableView DataSource Problem


  • Subject: NSTableView DataSource Problem
  • From: "Alex Wait" <email@hidden>
  • Date: Thu, 19 Jun 2008 19:13:18 -0700

First time doing this on my own.

I have the classic AppController class. I set the datasource and the
delegate to be AppController for my dataSource. I have a NSTableView* to the
table
that I also set in Interface Builder.

I have the methods below. listOfItems is a NSMutableArray with some NSString
objects in it.

I get the warning:
2008-06-19 19:12:55.889 OwnDataSource[96942:10b] *** Illegal NSTableView
data source (<AppController: 0x137b00>).  Must implement
numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:

But I clearly have those. What have I done wrong?

Thanks for any help,
Alex

-(int) numberOfRowsInTableView:(NSTableView*) thetable
{

    return [listOfItems count];
}

-(id) table: (NSTableView*)tv
             objectValueForTableColumn:(NSTableColumn*)tableColumn
             row:(int) row
{

    return [listOfItems objectAtIndex:row];

}
_______________________________________________

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 DataSource Problem
      • From: Cemil Browne <email@hidden>
  • Prev by Date: Re: NSReponder chain and controllers
  • Next by Date: Re: Add item to NSSavePanel sidebar
  • Previous by thread: Re: PDFKit guidance
  • Next by thread: Re: NSTableView DataSource Problem
  • Index(es):
    • Date
    • Thread