• 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
Usage of NSKeyedArchiver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Usage of NSKeyedArchiver


  • Subject: Usage of NSKeyedArchiver
  • From: Mike Abdullah <email@hidden>
  • Date: Fri, 31 Mar 2006 01:24:46 +0100

I am experimenting with usage of NSKeyedArchive in my app and so far things are going pretty well. However, I want to make sure I don't get off on the wrong foot.

Basically my app/document contains an array of myObject that the user modifies.

What I want to do is create an archive of the last 4 or 5 myObjects that have been used and store this on disk (preferably within my app's prefs file). Then, when the user is making a new myObject in the future, they have the option to either make a new "blank" myObject, or one they used recently.

I have implemented encodeWithCoder: in myObject and using NSKeyedArchiver can successfully place the thing on disk.

So, basically what this boils down to is, is NSKeyedArchiver the man for the job?

When I look at the file produced by my experimental archiveRootObject:toFile: things aren't as simple as I had expected - there's a lot of "mysterious" values in there which seem to be part of how NSKeyedArchiver works.

If I store this in my plist file, I want to be able to retrieve a string "summary" of myObject without actually instanciating myObject. Should I still use NSKeyedArchiver for this and store the summary string outside of the NSKeyedArchiver result and just "associate" the two in the plist?

Mike.
_______________________________________________
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: Cocoa Endians for Mac-Intel
  • Next by Date: NSTextView setHidden difficulty
  • Previous by thread: NSUserDefaults persistent domains
  • Next by thread: Re: Usage of NSKeyedArchiver
  • Index(es):
    • Date
    • Thread