• 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: Failure on unarchiving a NSBezierPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failure on unarchiving a NSBezierPath


  • Subject: Re: Failure on unarchiving a NSBezierPath
  • From: "Kyle Sluder" <email@hidden>
  • Date: Fri, 25 Apr 2008 04:29:17 -0400

On Fri, Apr 25, 2008 at 4:11 AM, an0 <email@hidden> wrote:
> Thanks. But it seems you haven't read to the end. As I said in my first mail:
>
> > Besides, I found the value returned by [NSKeyedUnarchiver
>  > unarchiveObjectWithData:data] was nil, but I didn't understand why,
>  > since it was normal when I saved the file using [NSKeyedArchiver
>  > archivedDataWithRootObject:view.drawing].

But you apparently haven't comprehended Jens' message.  You're not
setting *outError to anything, so whoever is calling your method is
seeing that you've returned NO and is expecting whatever it passed in
as outError to point to an NSError object.  Unfortunately this is not
the case and whatever was in that memory location is receiving bogus
messages -- particularly, -localizedFailureReason, which is an NSError
method.

In short, you're breaking the contract for messages which take an
NSError**.  Set *outError to an NSError object (or nil if you're lazy)
if you're going to return a value that signifies an error.

--Kyle Sluder
_______________________________________________

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: Failure on unarchiving a NSBezierPath
      • From: an0 <email@hidden>
References: 
 >Failure on unarchiving a NSBezierPath (From: an0 <email@hidden>)
 >Re: Failure on unarchiving a NSBezierPath (From: Jens Alfke <email@hidden>)
 >Re: Failure on unarchiving a NSBezierPath (From: an0 <email@hidden>)

  • Prev by Date: Using a real view in a Table cell
  • Next by Date: Re: Failure on unarchiving a NSBezierPath
  • Previous by thread: Re: Failure on unarchiving a NSBezierPath
  • Next by thread: Re: Failure on unarchiving a NSBezierPath
  • Index(es):
    • Date
    • Thread