• 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
Re: Adding <NSCoding> to NSTextStorage, or not.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Adding <NSCoding> to NSTextStorage, or not. (From: Kirk Kerekes <email@hidden>)

  • Prev by Date: Detecting whether app at path is running?
  • Next by Date: Re: Detecting whether app at path is running?
  • Previous by thread: Re: Adding <NSCoding> to NSTextStorage, or not.
  • Next by thread: Array question, Obj-C
  • Index(es):
    • Date
    • Thread