Re: newbie core data question
Re: newbie core data question
- Subject: Re: newbie core data question
- From: Keary Suska <email@hidden>
- Date: Mon, 12 Jul 2010 16:26:52 -0600
On Jul 12, 2010, at 1:14 PM, Oftenwrong Soong wrote:
> My managed classes need non-standard persistent attributes, such as CGPoint.
> Possibly, I'll need other C structs or enums as well.
>
> The Core Data Programming Guide section about non-standard persistent attributes
> (link below) says there are two ways to go about this: transformable attributes
> and transient properties. The introductory paragraph gives me the impression
> that transformable attributes are the preferred method. Unfortunately, the
> section that describes that technique seems very short on details.
>
> Do transformable attributes work only for object types or do they work for C
> structs and enums as well?
They work for anything that can be converted into an NSData instance. Which means anything and everything with the right implementation. The docs are pretty clear except that there isn't an example of implementing a custom transformer, as that is outside the scope of the doc and dealt with adequately elsewhere.
You should also consult Google, which finds many examples.
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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