Re: private methods and variables
Re: private methods and variables
- Subject: Re: private methods and variables
- From: Torsten Curdt <email@hidden>
- Date: Wed, 30 Jul 2008 01:30:09 +0200
@implementation MyClass
int privateVariable;
There is only one of these across the entire program. It's not an
instance variable. It's as close as Objective-C gets to what would
be a "class variable" in another language. (Although it should
probably be declared "static" to limit its linkage to this
translation unit.)
-(void) privateMethod {
}
-(void) publicMethod {
}
@end
Thanks guys. I basically though that there was a difference between:
@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?
cheers
--
Torsten
_______________________________________________
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