Re: Getting rid of primitive accessor warnings
Re: Getting rid of primitive accessor warnings
- Subject: Re: Getting rid of primitive accessor warnings
- From: Rick Mann <email@hidden>
- Date: Thu, 01 Nov 2012 12:04:38 -0700
On Nov 1, 2012, at 8:24 , Fritz Anderson <email@hidden> wrote:
> Declare them in a category so the compiler won't complain that the main implementation doesn't contain their definitions.
Ah! That's what I did wrong. I had also moved some property declarations to the .mm file, and put them in the same category as the CoreDataGeneratedAccessors; thus, I had an implementation for that category, just for the @dynamic directives, but obviously no implementation.
For clarity: Declare them in a category, and DON'T implement that category!
To address some of the other issues that were brought up:
Using the primitive<Key> methods is a perfectly reasonable and encouraged thing to do. There are legitimate situations where they're needed. Just using setPrimitiveValue:forKey defeats one of the purposes of custom subclasses.
My confusion stemmed from how it behaved in one project vs. another; I just abused the category.
Thanks, Fritz!
--
Rick
_______________________________________________
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