Re: Two text fields, one outlet?
Re: Two text fields, one outlet?
- Subject: Re: Two text fields, one outlet?
- From: Klaus Backert <email@hidden>
- Date: Mon, 5 Apr 2010 23:28:40 +0200
On 5 Apr 2010, at 22:40, Kyle Sluder wrote:
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
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 (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