Re: Custom Accessors in Core Data
Re: Custom Accessors in Core Data
- Subject: Re: Custom Accessors in Core Data
- From: "Sean McBride" <email@hidden>
- Date: Wed, 2 Feb 2011 15:16:21 -0500
- Organization: Rogue Research Inc.
On Wed, 2 Feb 2011 11:52:04 -0600, Gordon Apple said:
>I would like to have scaler accesors and also standard (NSNumber) accessors
>in my managed objects. The docs show some ways to handle the former, e.g.,
>"CGFloat myValue". I prefer not to cache. (I'm trying to retrofit an app
>to CoreData and prefer not to change all my code accesses to deal with
>NSNumber.)
>
>Assuming I do the above, but occasionally need the NSNumber, is there any
>reason why I cannot simply add a property, say "NSNumber myValuePrim" (not
>an attribute or cached value), and implement my own accessors for it, using
>the primitive value and the proper KVO?
>
>I wish CoreData had ways to automatically handle this.
Use mogenerator. It creates scalar accessors for you:
<http://rentzsch.github.com/mogenerator/>
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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