On Feb 25, 2010, at 7:10 PM, William Squires wrote:

> Why doesn't it just @synthesize the accessors? What would happen if I 
> replaced the @dynamic with @synthesize? Would it blow up, or just have weird 
> performance issues?

@dynamic and @synthesize are completely different. @synthesize causes the 
compiler to implement a getter/setter that directly changes the class' ivar (or 
fakes it in the 64-bit runtime). @dynamic tells the compiler that there at 
runtime, there will be an implementation of the getter/setter for the property 
in question, so that the compiler doesn't give a warning about missing methods. 
Replacing one with the other would cause your program to fail. 

You need to read 

http://www.devworld.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProperties.html

-- 
Dave Carrigan
d...@rudedog.org
Seattle, WA, USA

_______________________________________________

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