Re: About iVars declaration and property
Re: About iVars declaration and property
- Subject: Re: About iVars declaration and property
- From: Jens Alfke <email@hidden>
- Date: Tue, 15 Nov 2011 10:37:49 -0800
On Nov 15, 2011, at 10:34 AM, Torsten Curdt wrote:
> How does
>
> @property (nonatomic, assign) IBOutlet NSWindow *window;
>
> not have the information that there would need to be an ivar
>
> NSWindow *window;
>
> on 32-bit?
There’s no requirement that there be such an ivar, only a method named -window that returns an NSWindow*. The implementation of that method is arbitrary. For example it might just look like
- (NSWindow*) window { return [_parent window];}
Separating interface from implementation is a good thing and a keystone of OOP.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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