Re: Disabling auto-synthesis of property accessors.
Re: Disabling auto-synthesis of property accessors.
- Subject: Re: Disabling auto-synthesis of property accessors.
- From: Quincey Morris <email@hidden>
- Date: Thu, 21 May 2015 17:55:11 +0000
On May 21, 2015, at 10:40 , Fritz Anderson <email@hidden> wrote:
>
> I must have misinterpreted the question. I had understood Alex wanted a build option to turn off the auto-synthesis of properties, so the compiler could complain at every conflation of ivars with @propertys.
You didn’t misinterpret the question, but there’s no such build setting, so you have to solve the problem indirectly.
— You turn on the @synthesize warning.
— The warning message tells you when you’ve omitted a @synthesize.
— You add the “new-style” @synthesize:
@synthesize myProperty = _myProperty;
— Then all of your old naked ‘myProperty’ ivar references produce compile errors. QED.
Changing an old-style ‘@synthesize myProperty;’ to the new style leads to a similar result, but there’s no initial warning message to lead you there by the hand.
_______________________________________________
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