• 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: property name-to-accessor munging? (was: Dot Syntax docs missing?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)


  • Subject: Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)
  • From: Ken Thomases <email@hidden>
  • Date: Sun, 20 Jul 2008 03:33:13 -0500

On Jul 18, 2008, at 11:53 PM, Rick Mann wrote:

I realize after all this, it's not really the Dot Syntax I need. I need to know how a property name (starts with lower-case letter) is transliterated into the getter/setter names.

The dot syntax uses the getter and setting specified for the property in the @property declaration. As documented[1], if you don't explicitly supply getter or setter names in that directive, it defaults to the property name for the getter and "set" plus the property name with its first letter capitalized plus a trailing colon for the setter.


The naming conventions[2] used in Cocoa predate both Key-Value Coding[3] and the dot syntax, and therefore both follow them.

Cheers,
Ken



[1] http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/ObjectiveC/Articles/chapter_5_section_3.html#/ /apple_ref/doc/uid/TP30001163-CH17-SW2

[2] http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingMethods.html#/ /apple_ref/doc/uid/20001282-1004202-BCIGGFCC

[3] http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/AccessorConventions.html#/ /apple_ref/doc/uid/20002174-178660
_______________________________________________


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


  • Follow-Ups:
    • Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Dot Syntax docs missing? (From: Rick Mann <email@hidden>)
 >property name-to-accessor munging? (was: Dot Syntax docs missing?) (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Outline View not retaining objects it uses. Why?
  • Next by Date: Re: drawRect infinite loop -- argh!
  • Previous by thread: Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)
  • Next by thread: Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)
  • Index(es):
    • Date
    • Thread