Re: Two text fields, one outlet?
Re: Two text fields, one outlet?
- Subject: Re: Two text fields, one outlet?
- From: Kyle Sluder <email@hidden>
- Date: Mon, 5 Apr 2010 13:40:32 -0700
On Mon, Apr 5, 2010 at 1:56 AM, Klaus Backert <email@hidden> 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
_______________________________________________
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