Re: Adding <NSCoding> to NSTextStorage, or not.
Re: Adding <NSCoding> to NSTextStorage, or not.
- Subject: Re: Adding <NSCoding> to NSTextStorage, or not.
- From: jerome LAURENS <email@hidden>
- Date: Sun, 26 May 2002 00:34:00 +0200
Le samedi 25 mai 2002, ` 02:01 AM, Kirk Kerekes a icrit :
Although NSTextStorage is descended from NSAttributedString, which
implements <NSCoding>, NSTextStorage does not.
[...]
But it bugs me that it didn't work the way it "oughta".
Any wisdom on why it doesn't?
RTFM says that NSTextStorage is a semi abstract class: it does not
implement the model object that stores the string and its attribute. So
it cannot guess what should be the method to archive and unarchive the
data. Then coding must be implemented in the concrete subclass only.
I have a concrete NSTextStorage sublass that only stores a string and
not an attributed string, the underlying model object is an
NSMutableString and the attributes are computed on the fly according to
the contents of the string (for syntax coloring). Your method for coding
won't work for my object...
_______________________________________________
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.