Re: Getting rid of primitive accessor warnings
Re: Getting rid of primitive accessor warnings
- Subject: Re: Getting rid of primitive accessor warnings
- From: Keary Suska <email@hidden>
- Date: Thu, 01 Nov 2012 08:55:02 -0600
On Oct 31, 2012, at 10:02 PM, Rick Mann wrote:
> I'm not sure what's going on here. But I've got an iOS project that declares (but does not define) some "primitiveFoo" methods in my NSManagedObject subclass, and an OS X project that does so as well. However, the iOS project doesn't emit any warnings, while the OS X project does.
>
> PartDefinition.mm:45:17: Incomplete implementation
> PartDefinition.mm:36:1: Method definition for 'primitivePins' not found
This is normal and expected, as it is a default warning (at least on OS X). What is the problem, exactly? There is no value whatsoever that I know of to declare primitive accessors if you don't intend to implement them. Furthermore, you shouldn't need to declare primitive accessors at all as they should not be publicly called. Or in other terms, exposing them is probably a code smell. In any case, Core Data synthesizes them for you anyway….
> Also, when I generated the NSManagedObject subclass from the model, it didn't generate the primitive accessor declarations the way older Xcodes did. Am I doing something wrong?
Perhaps because implementing primitive accessors is only necessary in rather specific situations that I don't believe Xcode could predict? This would make their generation spurious. I am simply theorizing--perhaps taking this up on the Xcode-users list will garner better responses.
HTH,
Keary Suska
Esoteritech, Inc.
_______________________________________________
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