Re: subclass overwriting superclass ivar
Re: subclass overwriting superclass ivar
- Subject: Re: subclass overwriting superclass ivar
- From: Joanna Carter <email@hidden>
- Date: Wed, 26 May 2010 13:54:17 +0100
Hi Jonathan
> A subclass ivar is apparently overwriting a super class ivar.
> When an instance of MGS_B sets stderrData the super class ivar tempFilePath gets overwritten.
I'm not sure what you mean here by "overwrite".
@interface Base : NSObject
{
@private
int i;
}
@end
@interface Sub : Base
{
@private
int i;
}
@end
This code demonstrates what I would understand by overwriting, and it fails to compile. Although, it should be possible to redeclare such private ivars, it certainly is in C# and Delphi.
Joanna
--
Joanna Carter
Carter Consulting
_______________________________________________
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