• 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: Archiving/unarchiving root objects using instance methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Archiving/unarchiving root objects using instance methods


  • Subject: Re: Archiving/unarchiving root objects using instance methods
  • From: Graham Cox <email@hidden>
  • Date: Tue, 10 Mar 2009 12:42:19 +1100


On 10/03/2009, at 6:59 AM, Paul Kim wrote:

I have to encode the object with the undocumented "root" key.

And yes, for practical reasons, using the "root" key will work because of backwards compatibility but it would be nice if there were an official way to do this (or some semi-official word that using the "root" key is ok).


This isn't, of course, official in any way.

I use the "root" key also and expect it won't change. If Apple ever decided on some strange whim to do that, they'd break all existing archives out there or else have to add extra code to accept the existence of the "root" key in all those older archives. What would be the point?

As far as I could discover, if you need a delegate, you have no choice but to use "root". This fact pretty much forces Apple's hand since it's their error that they haven't documented or exposed this, but the wide existence of archives that must assume it means that they pretty much have to support it forever after.

Also, if it really concerns you, you could create your archiver manually also, using "root" as your explicit root key. That way you've supplied it at both ends and so your code would be proof against Apple ever changing this for the convenience methods.

File a documentation bug also - it'll be a dupe but at least this flags up the fact that it matters to devs.

--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: 
 >Archiving/unarchiving root objects using instance methods (From: Paul Kim <email@hidden>)

  • Prev by Date: Re: Is UITableView more memory efficient than UIScrollView?
  • Next by Date: Automatically select current system's timezone from popup button
  • Previous by thread: Re: Archiving/unarchiving root objects using instance methods
  • Next by thread: persisting user credentials -- how?
  • Index(es):
    • Date
    • Thread