Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dot Syntax docs missing?




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Dot Syntax docs missing? (From: Rick Mann <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.