• 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: Can't archive NSData :-(
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't archive NSData :-(


  • Subject: Re: Can't archive NSData :-(
  • From: Brendan Younger <email@hidden>
  • Date: Fri, 15 Jun 2001 00:10:28 -0500

It seems the problem is not with NSData as that conforms to NSCoding. The problem is with the internal type HTMLDocument. Since you're using -initWithHTML:, you cannot use the NSCoding protocol as -initWithHTML is part of the AppKit's NSAttributedString Additions and the additions do not conform to NSCoding.
My suggestion:
Either use keep your HTML as an NSData object and then convert it to a NSAttributedString when necessary or use NSAttributedString's -string: method to get an NSString which is archivable and use initWithString: to get a NSAttributedString after archiving.
Hope I helped.

Brendan Younger


References: 
 >Can't archive NSData :-( (From: "Michael P. Rogers" <email@hidden>)

  • Prev by Date: Re: Cocoa/EOF for non-enterprise apps Re: proof of cocoa
  • Next by Date: Re: Can't archive NSData :-(
  • Previous by thread: Can't archive NSData :-(
  • Next by thread: Re: Can't archive NSData :-(
  • Index(es):
    • Date
    • Thread