• 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
Writing a file type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Writing a file type


  • Subject: Writing a file type
  • From: Rob Rix <email@hidden>
  • Date: Sun, 2 Sep 2001 04:24:55 -0400

Greetings, all.

In a project that I'm working on, I'm going to want to archive data to a file. So, I've read up on NSArchiver and NSUnarchiver and NSSerializer, et cetera, and the NSCoding protocol.

Problem is, I want to write to a bundle, not a flat file. The bundle would contain files for various objects and also resources that they share. So, it would be analogous to the .rtfd file format that TextEdit handles.

So far, it seems to me that my options are limited to writing my own coder class or making odd use of NSArchiver (archiving objects individually, not as a graph) and then doing some severe messing about during unarchiving. Since the latter seems implausible (not merely hackish), I'd guess that leaves me with writing a coder. So, what I want to know is, any comments?
Is there something easier I could be doing?
Any notes on writing coders in general?
Any coder sample code out there?

Thanks very much,

-- Rob

Vous Sortez du Secteur Canadien


  • Follow-Ups:
    • Re: Writing a file type
      • From: John Hörnkvist <email@hidden>
    • Re: Writing a file type
      • From: "Erik M. Buck" <email@hidden>
  • Prev by Date: Re: The unquittable App
  • Next by Date: Implementing behavior for "make" appleevent in Cocoa App.
  • Previous by thread: Re: The unquittable App
  • Next by thread: Re: Writing a file type
  • Index(es):
    • Date
    • Thread