• 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
Newbie archiving questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie archiving questions


  • Subject: Newbie archiving questions
  • From: Andy Bettis <email@hidden>
  • Date: Sat, 11 Jun 2005 09:06:37 +0100

Hi,

In my pre-Cocoa days I generally saved data to file with tags - each item within an object was saved with an associated label and an 'end of object' label was appended to the end. This allowed for new data fields to be added later without needing a new file version. It looks like encodeObject:forKey will do the same thing for me in Cocoa but while I can see how to add it to individual object classes I can't see how to use it within the top-level document object. In my test app the document currently holds two NSMutableArray objects (and more items will probably be added later) but the dataRepresentationOfType method only returns one data object, so presumably I will have to put all of my objects into a single (NSMutableDictionary?) object and then archive that? And then for unarchiving I'd load the dictionary and enumerate through items from that? Or am I barking up the wrong tree?

Do I need to make keys unique within classes (i.e. make sure I'm not using the same key as in a superclass), or are there any other things to avoid?

Many thanks for your patience.

Rev. Andy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Updates from Download
  • Next by Date: Getting HTTP return info with sendSynchronousRequest
  • Previous by thread: Re: Updates from Download
  • Next by thread: Getting HTTP return info with sendSynchronousRequest
  • Index(es):
    • Date
    • Thread