subclass overwriting superclass ivar
subclass overwriting superclass ivar
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.
Moving tempFilePath up the ivar list resolves the problem (though doubtless creates another).
Moving ivar stderrData into the superclass also resolves it.
Does the problem lie in the interface declarations below or are things likely going astray at run time?
Note that gdb now includes improved support for watching ivars: (gdb) watch -location self->ivar
@interface MGS_A : NSObject <NSApplicationDelegate> {
@private
int argc;
const char **argv;
NSDictionary *taskDict;
NSString *error;
NSInteger errorCode;
NSMutableDictionary *errorInfo;
NSMutableDictionary *replyDict;
int stdoutSaved;
id resultObject;
id scriptObject;
NSString *scriptExtension;
NSString *scriptSourceExtension;
MGSScriptExecutorManager *scriptExecutorManager;
NSString *tempFilePath;
}
@interface MGS_B : MGS_A {
@private
NSData *stderrData;
}
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com
_______________________________________________
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