• 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: Dot Syntax docs missing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dot Syntax docs missing?


  • Subject: Re: Dot Syntax docs missing?
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 18 Jul 2008 21:51:57 -0700


On 2008 Jul, 18, at 20:58, Rick Mann wrote:

Where is the description of the dot syntax? The top of the Obj-C 2.0 docs (Properties section) refers you "Dot Syntax."

It also refers to "structure elements", by which they mean a C struct. Remember, Objective-C is built on C. With properties, as with C structs, you use a dot to indicate descent into the property hierarchy, such as the example they give there, myInstance.value. For a more complicated example, consider planet.continent.nation.region.city.


I have a property named "ep1". I need to implement accessors for it, but they're not getting called. I've tried variations of

setEp1
setep1
setEP1

setEp1: should work. The colon is significant and is a part of the method name.


If you have a choice, avoid using dot syntax at all.

Really? Why? Seems like Apple encourages it quite strongly, and I frakking hate square brackets.

I would advise you to embrace and learn both the dot syntax and square brackets.


_______________________________________________

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: Dot Syntax docs missing?
      • From: Rick Mann <email@hidden>
References: 
 >Dot Syntax docs missing? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Dot Syntax docs missing?
  • Next by Date: Re: Dot Syntax docs missing?
  • Previous by thread: Re: Dot Syntax docs missing?
  • Next by thread: Re: Dot Syntax docs missing?
  • Index(es):
    • Date
    • Thread