Le 27 avr. 2011 à 16:52, Matt Neuburg a écrit :

> And Apple now exemplifies this pattern, e.g. in the app template for 
> Window-based Application: there's a "window" property accessing a "_window" 
> ivar. I think they do this just so you can't accidentally say "window" 
> unqualified. m.

I also think that Apple is (finally) starting to use the @private and 
@protected visibility specifiers in templates which, although they are not as 
"strict" as in other languages, start to educate people not to use ivars 
directly.

I too would like to see a means of explicitly accessing the ivar, even if it 
has the same name as the property; although, I thought that not calling 
self.property from within the .m file defaulted to accessing the ivar if both 
it and a property existed?

Joanna

--
Joanna Carter
Carter Consulting

_______________________________________________

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