• 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: Using NSArchiver with NSDocument follow-up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Using NSArchiver with NSDocument follow-up


  • Subject: RE: Using NSArchiver with NSDocument follow-up
  • From: Weeks Family <email@hidden>
  • Date: Sun, 21 Sep 2003 17:00:53 -0400

I've got two responses to my original post. Thanks.

So I understand now that NSDocument subclasses should not implement the
the NSCoding protocol. I changed my doc subclass so that a
NSMutableArray holds all the data. And I removed the initWithCoder,
encodeWithCoder methods from my doc subclass. Now the doc subclass
dataRepresentationOfType invokes archivedDataWithRootObject with the
mutable array. I can save and open files now.

The encodeWithCoder still gets called twice for each of the objects in
the mutable array. I do not understand this. The initWithCoder gets
called once, this sounds correct.

Can anyone explain this?

Thanks.
John Weeks
_______________________________________________
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: Font Collections
  • Next by Date: Re: notifications questions
  • Previous by thread: Re: IB problem
  • Next by thread: Re: Using NSArchiver with NSDocument follow-up
  • Index(es):
    • Date
    • Thread