• 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: Swift Enums and CoreData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swift Enums and CoreData


  • Subject: Re: Swift Enums and CoreData
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 06 Jul 2015 23:29:39 +0000

On Jul 6, 2015, at 16:21 , Rick Aurbach <email@hidden> wrote:
>
> Are you suggesting that we implement a custom fetched property

No, I’m thinking of this:

https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html#//apple_ref/doc/uid/TP40001919-SW13 <https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html#//apple_ref/doc/uid/TP40001919-SW13>

under the heading “Scalar Value”, but some of the details are here:

https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/Articles/cdAccessorMethods.html#//apple_ref/doc/uid/TP40002154-SW1 <https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/Articles/cdAccessorMethods.html#//apple_ref/doc/uid/TP40002154-SW1>

The idea is that you create non-primitive accessors that have a type that’s not known to Core Data. You back it with a Core Data property, using any convenient mechanism. Optionally, you can have an instance variable that caches the non-CD value, or you can just convert it back and forth on the fly.

Note that you can, of course, back your customized property with multiple CD properties, or with a CD property whose value themselves have sub-properties.



_______________________________________________

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


  • Follow-Ups:
    • Re: Swift Enums and CoreData
      • From: Rick Aurbach <email@hidden>
References: 
 >Swift Enums and CoreData (From: Rick Aurbach <email@hidden>)
 >Re: Swift Enums and CoreData (From: Quincey Morris <email@hidden>)
 >Re: Swift Enums and CoreData (From: Rick Aurbach <email@hidden>)

  • Prev by Date: Re: selectText of NSTextField on focus
  • Next by Date: Re: selectText of NSTextField on focus
  • Previous by thread: Re: Swift Enums and CoreData
  • Next by thread: Re: Swift Enums and CoreData
  • Index(es):
    • Date
    • Thread