Re: Checkbox Mayhem
Re: Checkbox Mayhem
- Subject: Re: Checkbox Mayhem
- From: "Frank D. Engel, Jr." <email@hidden>
- Date: Sun, 18 Dec 2016 15:17:49 -0500
I see...
I had been using @dynamic for object types and @synthesize for basic
types (such as BOOL and int). It seems I will need to create the
accessors then for the basic types as I just tried and @dynamic does not
work for those.
Thank you!
On 12/18/2016 10:15, Keary Suska wrote:
On Dec 18, 2016, at 5:50 AM, Frank D. Engel, Jr. <email@hidden> wrote:
My guess is that for some reason the @synthesize methods are not calling "willChangeValueForKey" and the like - why would that be the case? I have worked on one or two other Core Data projects and I don't remember having to do this before...
With Core Data, you don’t use @synthesize, you use @dynamic. @synthesize will not create Core Data-friendly accessors. @dynamic allows the Core Data runtime to create the appropriate accessors for you.
Also, in the future, please don’t just say “they aren’t being saved”, even with “not using X or Y”. Say exactly how you are persisting as there are at least four common persistence methods (Archiving, User Defaults, Document-based, Core Data).
HTH,
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