• 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: Why Don't Cocoa's (Un)Archiving Methods return Errors?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?


  • Subject: Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?
  • From: Jerry Krinock <email@hidden>
  • Date: Sat, 30 Jul 2011 22:21:07 -0700

On 2011 Jul 30, at 21:09, Jens Alfke wrote:

> On Jul 29, 2011, at 8:22 PM, Jerry Krinock wrote:
>
>> +[NSKeyedArchiver isEncodeable:(id)object]
>> +[NSKeyedUnarchiver isAValidArchive:(NSData*)data]

BTW, I forgot to mention those methods should return BOOLs.

> Neither of these are feasible without actually running the archiving, including calling all of the arbitrary -initWithCoder: and -encodeWithCoder: methods. So they’d have all the same issues we’ve been discussing so far — they’d have to use a try…catch block around the [un]archiving, basically.

I don't think so, Jens.  "They" is Apple.  Apple has the source code for -initWithCoder: and -encodeWithCoder:.  They could remove the lines of code where those exceptions are created and return NO instead.

Anyhow, Apple is smarter than me, and they've clearly got the resources to handle this as well as fix the more important bugs in Lion that I'm holding my breath waiting for them to fix :))

So I filed an Enhancement - Apple Bug ID# 9870474 asking for those two methods.

_______________________________________________

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

  • Follow-Ups:
    • Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?
      • From: Jens Alfke <email@hidden>
References: 
 >Re: Why Don't Cocoa's (Un)Archiving Methods return Errors? (From: Rainer Brockerhoff <email@hidden>)
 >Re: Why Don't Cocoa's (Un)Archiving Methods return Errors? (From: email@hidden)
 >Re: Why Don't Cocoa's (Un)Archiving Methods return Errors? (From: Gwynne Raskind <email@hidden>)
 >Re: Why Don't Cocoa's (Un)Archiving Methods return Errors? (From: Jerry Krinock <email@hidden>)
 >Re: Why Don't Cocoa's (Un)Archiving Methods return Errors? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Printing options
  • Next by Date: Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?
  • Previous by thread: Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?
  • Next by thread: Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?
  • Index(es):
    • Date
    • Thread