• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: KVO Oddity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: KVO Oddity
      • From: Allan Odgaard <email@hidden>
    • Re: KVO Oddity
      • From: Joakim Danielson <email@hidden>
References: 
 >KVO Oddity (From: Chris Pavicich <email@hidden>)
 >Re: KVO Oddity (From: Scott Anguish <email@hidden>)
 >Re: KVO Oddity (From: Joakim Danielson <email@hidden>)

  • Prev by Date: Re: Writing a good Enhancement Request
  • Next by Date: Re: window rotation
  • Previous by thread: Re: KVO Oddity
  • Next by thread: Re: KVO Oddity
  • Index(es):
    • Date
    • Thread