NSTableView Protocol Help!

2008-09-04 Thread Eric Lee
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 ().  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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: NSTableView Protocol Help!

2008-09-04 Thread Keary Suska
9/4/08 5:10 PM, also sprach [EMAIL PROTECTED]:

> 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 ().  Must
> implement numberOfRowsInTableView: and
> tableView:objectValueForTableColumn:row:

As the error shows, the datasource for the tableview is set as a MyDocument
instance, and not your AppController class.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]