Hi all - I have the following class:
@interface SpWindow : NSWindow <NSCoding> {
BOOL _editMode;
SpBgView *bgView;
} ...
... which I then call archive on. My encode method is as follows:
- (void) encodeWithCoder:(NSCoder *)aCoder {
NSLog(@"encodeWithCoder CALLED FOR SpWindow");
[super encodeWithCoder:aCoder];
NSLog(@"SpWindow's encodeWithCoder got past the super call");
[aCoder encodeObject:bgView forKey:@"bgView"];
[aCoder encodeBool:_editMode forKey:@"_editMode"];
}
... however the [super encodeWithCoder:aCoder];
bit results in the following in the console log:
encodeWithCoder CALLED FOR SpWindow
<SpWindow: 0x20009f660> does not support archiving
*** -[NSKeyedArchiver finalize]: warning: NSKeyedArchiver finalized without having had -finishEncoding called on it.
... according to the NSWindow documentation the class conforms to the NSCoding protocol, so I have no idea why I'm seeing this issue.
Any ideas ?
--- EDIT: The class reference for NSWindow shows:
Conforms to NSCoding (NSResponder)
... NOT just "Conforms to NSCoding"
- so I guess does this mean that only the NSResponder bits conform to NSCoding ?