Re: Managed Object with Transformable Attribute (C Struct)
Re: Managed Object with Transformable Attribute (C Struct)
- Subject: Re: Managed Object with Transformable Attribute (C Struct)
- From: Graham Cox <email@hidden>
- Date: Wed, 16 Dec 2009 15:18:41 +1100
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@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