Accessor method naming (a question)
Accessor method naming (a question)
- Subject: Accessor method naming (a question)
- From: Larry Gerndt <email@hidden>
- Date: Thu, 9 Jun 2005 15:26:10 -0700
Quoting from Apple's coding guidelines, located at: http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/index.html
<quote> "If the attribute is expressed as a verb, the format is: - (void)setVerbObject:(BOOL)flag; - (BOOL)verbObject; For example: - (void)setShowsAlpha:(BOOL)flag; <quote/>
NSView defines "isHidden" and "setHidden". Shouldn't this be "isHidden" and "setIsHidden"? If not, then Accessorizor won't work, because if your ivar is name "isHidden", it will produce "setIsHidden". I guess the question is, how serious a violation of the coding rules is "setIsHidden" as opposed to "setHidden"?
-- Larry Gerndt AIM Handle: SonOfTheSonOfMan Let the truth be told though the heavens fall -- James Garrison |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden