• 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
NSTextStorage subclassing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: PDF reader
  • Next by Date: Re: Cocoa training?
  • Previous by thread: Re: PDF reader
  • Next by thread: Validate a Password
  • Index(es):
    • Date
    • Thread