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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to