• 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
Sub classing.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Sub classing.
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: Synchronizing Thread Execution
  • Next by Date: Re: Synchronizing Thread Execution
  • Previous by thread: Re: Linking a model to an UndoManager with KVC/KVO
  • Next by thread: Re: Sub classing.
  • Index(es):
    • Date
    • Thread