Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
- Subject: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
- From: Gerd Knops <email@hidden>
- Date: Fri, 18 Jun 2010 11:21:43 -0500
I just installed Xcode 3.2.3, and now in my project compiled with LVM/Clang I get lots of these warnings (code builds and runs fine in previous Xcode/compiler versions):
warning: writable atomic property 'someProperty' cannot pair a synthesized setter/getter with a user defined setter/getter
This is in cases where I use @synthesize, but provide a custom getter and rely on @synthesize to produce the setter (or vica versa).
So basically in the header I have:
@property (retain) SomeClass *someProperty;
and in the implementation:
@synthesize someProperty;
- (SomeClass *)someProperty {
if(!someProperty)
{
someProperty=[[self createSomeProperty]retain];
}
return someProperty;
}
// No setter, let @synthesize provide it
I get a warning for my custom getter.
How can I code this to not get a warning? I really would like to avoid writing setters where I don't need a custom behavior.
Thanks
Gerd
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden