NSTextStorage subclassing
NSTextStorage subclassing
- Subject: NSTextStorage subclassing
- From: Francisco Tolmasky <email@hidden>
- Date: Tue, 5 Aug 2003 11:05:02 -0700
I subclassed NSTextStorage to support line break conventions and such
(I thought this was the best class to subclass since it is the model)
and I'm getting an error I think comes about due to class clusters.
When I run it says "*** -string only defined for abstract class.
Define -[WSTextStorage string]!"
I think I used to get something similar when I subclassed
NSMutableArray. Does this mean I have to do something like this:
@interface WSTextStorage: NSTextStorage
{
NSTextStorage embeddedTextStorage;
//...
}
- (NSString *)string;
@end
- (id)init
{
self= [super init];
if(self)
embeddedTextStorage= [[NSTextStorage alloc] init];
return self;
}
- (NSString *)string
{
return [embeddedTextStorage string];
}
Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.