Re: properties and subclasses
Re: properties and subclasses
- Subject: Re: properties and subclasses
- From: Preston Sumner <email@hidden>
- Date: Thu, 05 Jul 2012 10:23:31 -0600
On Jul 5, 2012, at 9:56 AM, James Maxwell wrote:
> Okay, thanks. That seems reasonable, but I wanted to double-check. I remember reading some discussion a while ago that seemed to suggest that dot syntax was only for calling synthesized properties, not methods… Though precisely what a synthesized property would be, other than an accessor method (operative word being "method"), was never really explained! ;-)
>
> Thanks again.
>
> J.
The discussion may have been referring to misuse, such as calling "obj.retain" (which I believe the compiler warns about). But since dot-syntax is just an alternate syntax for calling methods, you can use it on methods in older code that are properties conceptually but aren't explicitly declared such, like NSArray's -count method.
Preston
_______________________________________________
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