On 2011-12-29, at 9:43 PM, Conrad Shultz wrote:
> "textField" is the name of the *property*.  "_textField" is the name of
> the (private) *instance variable* (ivar) that is backing the property.
<snip>

Thanks Conrad for that full explanation which I now fully understand.
Actually the way I think of it now is that in this example "textField" is 
really the name of a *method*.

As Ken stated earlier it's merely an error in the tutorial code.
For which I'm very glad since It made me carefully re-read the Declared 
Properties chapter of OBJ-C 2.0.

One key thing to remember is that @property occurs in the method declaration 
list.
Another is that @synthesize generates accessor *methods*;

So that in the expression if (sender == self.textField){senderName = 
@"textField"; }
we are invoking the accessor method textField. As with any local method we need 
self.

My first use of Obj-C 2.0. Yippee I learned something today.

Thanks everyone.







_______________________________________________

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