On 5 Apr 2010, at 22:40, Kyle Sluder wrote:

On Mon, Apr 5, 2010 at 1:56 AM, Klaus Backert <klaus.back...@t-online.de > wrote:
Setting of properties can and should be done this way (except when using the
modern runtime and synthesizing the instance variable):

There's nothing different about synthesizing the instance variable.

If you want the property semantics, use either dot syntax (foo.bar =
baz) or message syntax ([foo setBar:baz]). They are defined to be
exactly equivalent. Again, you can use whichever you like.

If you want the direct ivar access semantics (for example, in -init
and -dealloc), but you've synthesized the ivar, you can use pointer
dereference through self to get at it (self->bar = baz).

Both semantics are necessary. It's important to understand the
difference between them.

Older compilers don't support pointer dereference for synthesized
ivars. This is a bug, and you should upgrade your development tools.

--Kyle Sluder

Yes, I know. My statement above has a different background, among other things a documentation bug (somebody told me off list about it), and, sigh, my incomplete ablity of expressing myself in a foreign language.

Klaus

_______________________________________________

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