Re: warning: local declaration hides instance variable
Re: warning: local declaration hides instance variable
- Subject: Re: warning: local declaration hides instance variable
- From: Chris Hanson <email@hidden>
- Date: Mon, 3 Sep 2007 22:24:42 -0700
On Sep 3, 2007, at 11:52 AM, Laurence Harris wrote:
An even better solution would be to rename your instance variables
with a standard naming convention that clearly identifies them as
instance variables. Since they're also referred to as member
variables, a lot of people prefix their names with an "m":
Instance variables in Objective-C are not referred to as member
variables; it's not common to prefix them with "m." The most common
prefix I've seen is the underscore. This is because instance
variables whose name starts with an underscore are automatically
discovered by Key-Value Coding just as un-prefixed instance variables
are; instance variables with other prefixes will not be discovered by
Key-Value Coding or any mechanisms built atop it (such as Key-Value
Observing or Cocoa Bindings).
For more information on Cocoa naming conventions, see the Coding
Guidelines for Cocoa.
Coding Guidelines for Cocoa
http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/index.html
It's a document that anyone coming to Cocoa from other environments
should read; it describes what idiomatic Cocoa code looks like, so you
don't appear to be writing C, C++ Java, or C#/VB.NET code using
Objective-C syntax.
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden