• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie core data question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >newbie core data question (From: Oftenwrong Soong <email@hidden>)

  • Prev by Date: Re: Problems with NSPathControl
  • Next by Date: NSViewController and key value coding
  • Previous by thread: newbie core data question
  • Next by thread: NSThread Subclassing problem for Singleton instance
  • Index(es):
    • Date
    • Thread