Re: KVO Oddity
Re: KVO Oddity
- Subject: Re: KVO Oddity
- From: "Louis C. Sacha" <email@hidden>
- Date: Fri, 14 May 2004 01:23:16 -0700
Hello...
Apple reserves the use of the underscore prefix for its own private stuff.
http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/index.html
Specifically:
Regarding naming private methods
http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingMethods.html#//apple_ref/doc/uid/20001282/BCIBDJCA
Regarding naming variables
http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingIvarsAndTypes.html#//apple_ref/doc/uid/20001284/1001757
Hope that helps,
Louis
_ as the first character of a variable is reserved.
KVC will look for _ in the variable name if you asked for
attributes, but didn't implement -attributes,
From the documentation on Apple's site, I've got the impression that
it is OK to use _ as the first character.
At least that what the write in the article "Ensuring KVC
Compliance" in the Key-Value documentation at
http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/index.html
Please correct me if I'm wrong since I'm using _ quite much.
Joakim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.