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

NSTableView Protocol Help!


  • Subject: NSTableView Protocol Help!
  • From: Eric Lee <email@hidden>
  • Date: Thu, 4 Sep 2008 18:10:00 -0500

So, I've written a practice application with NSTableView, and NSMutableArray. I have NSTableView connected to AppController as a dataSource, and I connected all outlets.

I have ALREADY defined the protocols needed, but for some reason, this message keeps on appearing in the debugger:

*** Illegal NSTableView data source (<MyDocument: 0x167290>). Must implement numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:

Here are the protocols that I have written:

___________________________________________________

- (void)tableView:(NSTableView *)anotherTableView
  setObjectValue:(id)anObject
  forTableColumn:(NSTableColumn *)anotherTableColumn
			  row:(NSInteger)rowIndex
{
	[mutableArray replaceObjectAtIndex:rowIndex withObject:anObject];
}

- (id)tableView:(NSTableView *)aTableView
	  objectValueForTableColumn:(NSTableColumn *)aTableColumn
	  row:(NSInteger)rowIndex
{
	return [mutableArray objectAtIndex:rowIndex];
}

- (NSInteger)numberOfRowsInTableView:aTableView
{
	return [splitViewMutableArray count];
}

___________________________________________________
Thanks for any help!!
_______________________________________________

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 Protocol Help!
      • From: Keary Suska <email@hidden>
  • Prev by Date: GDB Problems
  • Next by Date: Re: NSTableView Protocol Help!
  • Previous by thread: Re: GDB Problems
  • Next by thread: Re: NSTableView Protocol Help!
  • Index(es):
    • Date
    • Thread