take the @dynamic out. 

Since you are synthesizing the property you don't need the @dynamic which 
suppresses the warning that you haven't defined the setter or the getter. 

You use the @dynamic statement to tell the compiler to suppress a warning if it 
can’t find an implementation of accessor methods specified by an @property 
declaration.



On 12-Nov-2009, at 5:52 PM, Joerg Simon wrote:

> Dear all other Cocoa Developers:
> 
> In an app I am developing I have the following strange thing:
> 
> [code in the .h file]
> @interface XY : CALayer
>    BOOL _editing;
> ...
> @property (assign, getter = isEditing) BOOL editing;
> 
> [/code]
> 
> [code in the .m file]
> @synthesize editing = _editing;
> @dynamic editing;
> ....
> [/code]
> I get: error: property 'editing' is already implemented
> 
> So, this code now compiles:
> Fine for all versions of OSes under leopart
> Only for versions 2.x under snow leopard.
> 
> Since my laptop runs snow leopard, and I am very often developing on my 
> laptop, and snow leopard lacks a OS 2.x iPhone simulator, that means I can't 
> use the simulator on the iPhone, and it secondly means that the app has 
> problems to compile with the new compiler, and that would be bad if apple 
> switches internally.
> 
> Any suggestions what to do?
> 
> Thanks,
>  Joerg Simon
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org
> 
> This email sent to r...@rols.org

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to