• 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: properties and subclasses
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >properties and subclasses (From: James Maxwell <email@hidden>)
 >Re: properties and subclasses (From: Jens Alfke <email@hidden>)
 >Re: properties and subclasses (From: James Maxwell <email@hidden>)

  • Prev by Date: Re: NSInteger vs int vs int32_t
  • Next by Date: Re: Stupid block syntax!
  • Previous by thread: Re: properties and subclasses
  • Next by thread: Re: properties and subclasses
  • Index(es):
    • Date
    • Thread