• 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: NSKeyedArchiever and XML Format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSKeyedArchiever and XML Format


  • Subject: Re: NSKeyedArchiever and XML Format
  • From: Graham Cox <email@hidden>
  • Date: Fri, 12 Dec 2008 14:36:45 +1100


On 12 Dec 2008, at 2:19 pm, Martin Wierschin wrote:

That actually would not have helped, because it's an instance method. The whole problem to begin with was that there wasn't any clear way for a manually constructed instance of NSKeyedUnarchiver to decode a file previously saved using the convenience method.

But really, I've no problem here to solve. The file is long gone. I just remember going through the docs at the time and throwing my hands up in frustration that they didn't mention the "root object key" used by the convenience method. I tried "Root" as the key and the plain "decodeObject" method, but neither worked. Thanks to Patrick I now know the key is "root", which I should have tried, but ought to be documented.


Ak OK, I understand.

I checked back in my own code which uses this and has always worked OK - I'm using the convenience method to archive for binary files, and a manual archiver for XML files, and the same manual dearchiver for both - so I wondered how this was working. Turns out that *by pure chance* I happened to choose the key "root". Lucky, that.

You're right, it should be documented.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSKeyedArchiever and XML Format (From: Patrick Mau <email@hidden>)
 >Re: NSKeyedArchiever and XML Format (From: Nathan Vander Wilt <email@hidden>)
 >Re: NSKeyedArchiever and XML Format (From: Martin Wierschin <email@hidden>)
 >Re: NSKeyedArchiever and XML Format (From: Nathan Vander Wilt <email@hidden>)
 >Re: NSKeyedArchiever and XML Format (From: Martin Wierschin <email@hidden>)
 >Re: NSKeyedArchiever and XML Format (From: Graham Cox <email@hidden>)
 >Re: NSKeyedArchiever and XML Format (From: Martin Wierschin <email@hidden>)

  • Prev by Date: Re: Starting Cocoa apps from the command line
  • Next by Date: Re: Blunt edges to Window
  • Previous by thread: Re: NSKeyedArchiever and XML Format
  • Next by thread: Re: Core Data warning: to-many relation does not have an inverse
  • Index(es):
    • Date
    • Thread