Re: @property problem
Re: @property problem
- Subject: Re: @property problem
- From: j o a r <email@hidden>
- Date: Tue, 12 Feb 2008 10:48:40 -0800
On Feb 12, 2008, at 7:58 AM, Sean McBride wrote:
PS: To forstall an FAQ: Yes, it is kosher to use "_" as your ivar
prefix, even though the Foundation and AppKit classes do the same.
Name collisions are not a problem.
Could you elaborate? If I subclass NSView and add an ivar named
"_sisterView" then in some future SDK NSView.h also gets a _sisterView
ivar, wouldn't there be a compiler error?
Yes, and that's why I believe Jens is telling you that it's OK to use
the same prefix for ivars as anyone else that you're sharing code
with: Because any name clashes would be immediately apparent. This in
contrast to, for example, method names.
Pity private ivars have to be in public headers...
Agreed, that is truly a pity.
j o a r
_______________________________________________
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