Sub classing.
Sub classing.
- Subject: Sub classing.
- From: Sandro Noel <email@hidden>
- Date: Tue, 5 Dec 2006 10:07:54 -0500
Greetings.
Am I doing this wrong ?
i want to create a Dataset for a table view, it's a simple one an the
values should be static.
so i declare .
@interface StatusTableDataset : NSMutableArray {
}
- (id) init;
- (void) dealloc;
- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:
(NSTableColumn *)aTableColumn row:(int)rowIndex;
@end
----------------------
this works nicely at compile time, but
- (int)numberOfRowsInTableView:(NSTableView *)aTableView{
return [self count];
}
at runtime will tell me that "count" is only defined for abstract
classes,and that i have to declare my own,
2006-12-05 10:04:51.684 t[3211] An uncaught exception was raised
2006-12-05 10:04:51.684 t[3211] *** -count only defined for abstract
class. Define -[StatusTableDataset count]!
2006-12-05 10:04:51.684 t[3211] *** Uncaught exception:
<NSInvalidArgumentException> *** -count only defined for abstract
class. Define -[StatusTableDataset count]!
who should i inherit from to get all the nice functionality, and not
have to implement them myself ? :)
thank you!
Sandro Noel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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