• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [iPhone] OS 3.0 and @synthesize AND @dynamic for the same property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iPhone] OS 3.0 and @synthesize AND @dynamic for the same property


  • Subject: Re: [iPhone] OS 3.0 and @synthesize AND @dynamic for the same property
  • From: Joerg Simon <email@hidden>
  • Date: Sat, 14 Nov 2009 18:17:33 +0100

Thanks BJ and Roland!,

I always had a crash when I took the @dynamic out, but now I figured out, that was another bug how just randomly appeared also when I changed this code :D. With your advice I tried to take it out again, and it works. That's actually why I posted the problem, because every documentation I found in the internet more or less stated to me that this code doesn't make sence. Even more you are confused when you find it in a running, working, selling productive code @_@.

Cheers, Joerg

Am 14.11.2009 um 08:06 schrieb BJ Homer:

On Thu, Nov 12, 2009 at 2:52 AM, Joerg Simon <email@hidden> 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;

The @dynamic is entirely unnecessary; you should use @synthesize or @dynamic, but not both.

-BJ

_______________________________________________

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


References: 
 >[iPhone] OS 3.0 and @synthesize AND @dynamic for the same property (From: Joerg Simon <email@hidden>)
 >Re: [iPhone] OS 3.0 and @synthesize AND @dynamic for the same property (From: BJ Homer <email@hidden>)

  • Prev by Date: Re: Stack-based C++ class to wrap NSAutoreleasePool
  • Next by Date: Re: Stack-based C++ class to wrap NSAutoreleasePool
  • Previous by thread: Re: [iPhone] OS 3.0 and @synthesize AND @dynamic for the same property
  • Next by thread: Using HTML form in cocoa app
  • Index(es):
    • Date
    • Thread