Re: Failure on unarchiving a NSBezierPath
Re: Failure on unarchiving a NSBezierPath
- Subject: Re: Failure on unarchiving a NSBezierPath
- From: "Michael Ash" <email@hidden>
- Date: Mon, 28 Apr 2008 11:03:25 -0400
On Mon, Apr 28, 2008 at 2:24 AM, Kyle Sluder
<email@hidden> wrote:
> On Fri, Apr 25, 2008 at 5:10 AM, an0 <email@hidden> wrote:
> > Thanks a lot if you or others can give me some more hint.
>
> You really aren't getting the point.
>
> You're returning NO from -readFromData:ofType:error. You're not
> setting *outError to anything meaningful. Therefore your program is
> printing out weird logs. Until you fix this bug your error log is
> useless and can't help you debug your application.
I don't think you're getting the point yourself. The reason he's
returning NO is because his unarchiving fails, and it shouldn't fail.
Certainly the code *should* set the error (if outError is non-nil) but
this is a secondary problem, as that code path shouldn't even happen.
As for the original problem, I suggest testing the code piece by
piece. Does the resulting NSData look correct (have non-zero contents,
reasonable length for the input), does it work if you immediately
unarchive right after archiving, does the data you get in the second
method match the data you create in the first?
Mike
_______________________________________________
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