On 16/12/2009, at 3:11 PM, Richard Somers wrote:

>         return [NSKeyedArchiver archivedDataWithRootObject:value];
>     }
> 
> When I save the document I get an error: *** -[NSKeyedArchiver 
> encodeValueOfObjCType:at:]: this archiver cannot encode structs.
> 
> Any ideas what's wrong?


You're archiving 'value'. You want instead to return the mutableData that the 
first archiver wrote to, which is otherwise unused.

return data;

--Graham


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to