Re: Failure on unarchiving a NSBezierPath
Re: Failure on unarchiving a NSBezierPath
- Subject: Re: Failure on unarchiving a NSBezierPath
- From: an0 <email@hidden>
- Date: Fri, 25 Apr 2008 16:11:03 +0800
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].
On Fri, Apr 25, 2008 at 3:20 AM, Jens Alfke <email@hidden> wrote:
> I suspect what happened is that NSKeyedArchiver returned nil for some
> reason, and the caller of that method then looked at *outError to find the
> reason for the error; but you didn't store anything in there, so it got
> whatever happened to be in that variable, which in this case may have been a
> pointer to the NSDocumentController.
>
> So try adding a test for nil to your save method. It looks like that's
> where the problem is.
>
> —Jens
_______________________________________________
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