Files
cappuccino/Tools/nib2cib/NSCustomView.j
T
Francisco Ryan Tolmasky I a97bb72800 Initial commit.
Reviewed by francisco, ross and tom.
2008-09-04 03:52:20 -07:00

43 lines
716 B
Plaintext

import <AppKit/CPCustomView.j>
import "NSView.j"
@implementation NSCustomView : CPView
{
CPString _className;
}
- (id)initWithCoder:(CPCoder)aCoder
{
self = [super NS_initWithCoder:aCoder];
if (self)
_className = [aCoder decodeObjectForKey:@"NSClassName"];
return self;
}
- (void)encodeWithCoder:(CPCoder)aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeObject:_NSCustomViewMapClassName(_className) forKey:@"CPCustomViewClassNameKey"];
}
- (CPString)classForKeyedArchiver
{
return [CPCustomView class];
}
@end
function _NSCustomViewMapClassName(aClassName)
{
if (aClassName == @"NSView")
return "CPView";
return aClassName;
}