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

Re: NSTableView DataSource Problem


  • Subject: Re: NSTableView DataSource Problem
  • From: Cemil Browne <email@hidden>
  • Date: Fri, 20 Jun 2008 12:16:50 +1000

Alex,

I believe your problem may lie in:

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

is not an implementation of tableView:objectValueForTableColumn:row: - note you name it "table" rather than "tableView"


I could be wrong, however...

Cemil

On 20/06/2008, at 12:13 PM, Alex Wait wrote:

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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 DataSource Problem (From: "Alex Wait" <email@hidden>)

  • Prev by Date: Re: Add item to NSSavePanel sidebar
  • Next by Date: Race in Apple's NSTreeContoller/NSOutlineView
  • Previous by thread: NSTableView DataSource Problem
  • Next by thread: [Text rendering] Is there a known issue in Mac OS X 10.4.11?
  • Index(es):
    • Date
    • Thread