• 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: NSString Class Instance Variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString Class Instance Variables


  • Subject: Re: NSString Class Instance Variables
  • From: Graham Cox <email@hidden>
  • Date: Wed, 14 Oct 2009 10:29:41 +1100


On 14/10/2009, at 6:40 AM, Richard Somers wrote:

The same is true for NSArray, NSSet, and other foundation classes. If the class has no instance variables, what does it do for storage?


Apart from the class cluster answer you already got, the public headers don't need to include any instance variables even if they exist in reality. You can do this yourself - compile the code using the 'real' headers then publish a public header that strips the ivars and only includes any public API you want to expose. It's a good habit to mark ivars as @private unless you really, really cannot avoid doing that, and if they are private there's no need to publish them.

--Graham


_______________________________________________

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: NSString Class Instance Variables
      • From: Greg Parker <email@hidden>
    • Re: NSString Class Instance Variables
      • From: Jens Alfke <email@hidden>
References: 
 >NSString Class Instance Variables (From: Richard Somers <email@hidden>)

  • Prev by Date: Re: How to iterate over all objects stored with NSCoder
  • Next by Date: Re: arrayWithContentsOfFile
  • Previous by thread: Re: NSString Class Instance Variables
  • Next by thread: Re: NSString Class Instance Variables
  • Index(es):
    • Date
    • Thread