• 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 Information Hiding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @properties and Information Hiding


  • Subject: Re: @properties and Information Hiding
  • From: Raffael Cavallaro <email@hidden>
  • Date: Thu, 1 Nov 2007 11:00:18 -0400


On Nov 1, 2007, at 9:07 AM, Karl Goiser wrote:

Along these lines, I am looking for advise on how to implement a pattern that I am sure many people use: having a private setter and a public getter. Before properties, I'd implement the two methods in the implementation part and only declare the getter in the interface part. But now, in the 2.0 world, how can I leverage the magic of synthesis to implement such a pattern?

p. 50 of the Objective-C 2.0 pdf:

"This enables two common implementation patterns; mutable
subclass of an immutable class (NSString, NSArray, and NSDictionary are all examples) and a
property that has public API that is readonly but a private readwrite implementation internal to
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the class."




Raffael Cavallaro, Ph.D.
email@hidden

_______________________________________________

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: @properties and Information Hiding
      • From: Karl Goiser <email@hidden>
References: 
 >@properties and Information Hiding (From: Karl Goiser <email@hidden>)

  • Prev by Date: Re: @properties and Information Hiding
  • Next by Date: Re: [Leopard] Core Data and model changes regarding indexing
  • Previous by thread: Re: @properties and Information Hiding
  • Next by thread: Re: @properties and Information Hiding
  • Index(es):
    • Date
    • Thread