• 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: private methods and variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: private methods and variables


  • Subject: Re: private methods and variables
  • From: Torsten Curdt <email@hidden>
  • Date: Wed, 30 Jul 2008 02:59:25 +0200

Thanks for the clarification folks!

On Jul 30, 2008, at 01:58, Ken Thomases wrote:

On Jul 29, 2008, at 6:53 PM, Kyle Sluder wrote:

On Tue, Jul 29, 2008 at 7:30 PM, Torsten Curdt <email@hidden> wrote:
@implementation MyClass
int privateVariable;
@end

and

int privateVariable;
@implementation MyClass
@end

the first being being an ivar. The second just being a global.
But IIUC now - there really is no difference. That correct?

Did you intend for the first example's ivar to be contained within braces? In that case, you were right the first time.

You can't add additional ivars in an @implementation block. You can only redundantly mirror the ivar declarations that were in the @interface block which is a waste of typing and doesn't accomplish what he was trying to do: declare private instance variables that wouldn't appear in the header.


Cheers,
Ken


_______________________________________________

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: private methods and variables
      • From: Torsten Curdt <email@hidden>
References: 
 >private methods and variables (From: Torsten Curdt <email@hidden>)
 >Re: private methods and variables (From: Ken Thomases <email@hidden>)
 >Re: private methods and variables (From: Torsten Curdt <email@hidden>)
 >Re: private methods and variables (From: "Kyle Sluder" <email@hidden>)
 >Re: private methods and variables (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: private methods and variables
  • Next by Date: Detecting platform architecture within Cocoa app?
  • Previous by thread: Re: private methods and variables
  • Next by thread: Re: private methods and variables
  • Index(es):
    • Date
    • Thread