Re: Detecting Managed Object Property Change From Undo Redo
Re: Detecting Managed Object Property Change From Undo Redo
- Subject: Re: Detecting Managed Object Property Change From Undo Redo
- From: Keary Suska <email@hidden>
- Date: Tue, 27 Jan 2015 13:44:32 -0700
On Jan 27, 2015, at 9:52 AM, Jerry Krinock <email@hidden> wrote:
>
>> On 2015 Jan 27, at 06:46, Keary Suska <email@hidden> wrote:
>>
>> Better, however, to have a property declaration, which would also synthesize an ivar in modern LLVMs (as of Xcode 5?).
>
> You mean the property declaration would synthesize the ivar. I didn’t try that. I agree it would be better.
I should clarify that an ivar may not be synthesized if @dynamic is used. I forget what the current implementation does for CD, which is a special case. Specifying an ivar is probably the best and easiest approach.
>> If we stop and think a moment, why would calling super ever work? This is still Objective-C, and calling super is only valid when the class' superclass implements the method. And I bet NSManagedObject doesn't…
>
> Indeed, it crashed when I invoked it.
Also, more specifically, it is not an override but specifying an implementation that, if not provided, will be provided at run-time.
>> Primitive methods … There is absolutely nothing magical about them, because they need to be entirely un-magical to escape CD's notice.
>
>
>> Therefore it is really hard to break anything unless you deliberately do so (or deliberately ignore compiler warnings).
>
> I don’t think it warned me about defining a primitive setter without a primitive getter, although it might have because I tried it in a project that is currently giving me 60 warnings due to major work in progress
What exactly happened when you specified the setter, but not the getter? That part of the conversation was private between you and Quincey. I am simply curious as I can't imagine why one would want to. I would have thought that the runtime would have happily provided its own implementation, but since it would use the internal store and not the ivar the values won't match. I imagine some sort of inconsistency exception could happen...
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