On Wed, 22 Sep 2010 15:16:19 +0200, Uli Kusterer
<witness.of.teacht...@gmx.net> said:
> One point nobody mentioned so far: You can use different names for your public
property (e.g. an IBOutlet) and your internal storage (i.e. the instance
variable). I like to avoid name collisions between local variables and instance
variables by using an m prefix on instance variables. Using @synthesize
cancelButton = mCancelButton;, I can do that.
>
> Instead of declaring the instance variable as an IBOutlet, I can now declare
>
>@property (retain) IBOutlet NSButton*    cancelButton;
>
> and IB will call setCancelButton:, not setMCancelButton:, which wasn't
possible without properties.
Not so. If an outlet in IB is called "cancelButton", nib-loading will call
setCancelButton: if it exists, and of course setCancelButton: can be a front
for anything at all; no instance variable need exist, in fact, let alone one
having the same name. m.

-- 
matt neuburg, phd = m...@tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings



_______________________________________________

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