mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-04 20:05:03 +00:00
Added support for archiving NSTitle and NSNibBundleIdentifier from the View Controller palette for NSViewControllers.
This commit is contained in:
1 parent
25634a66cb
commit
d263c74d5d
2 files changed
+10
-3
No files matched your search
@@ -167,7 +167,8 @@
|
||||
|
||||
var CPViewControllerViewKey = @"CPViewControllerViewKey",
|
||||
CPViewControllerTitleKey = @"CPViewControllerTitleKey",
|
||||
CPViewControllerCibNameKey = @"CPViewControllerCibNameKey";
|
||||
CPViewControllerCibNameKey = @"CPViewControllerCibNameKey",
|
||||
CPViewControllerBundleKey = @"CPViewControllerBundleKey";
|
||||
|
||||
@implementation CPViewController (CPCoding)
|
||||
|
||||
@@ -185,7 +186,8 @@ var CPViewControllerViewKey = @"CPViewControllerViewKey",
|
||||
_view = [aCoder decodeObjectForKey:CPViewControllerViewKey];
|
||||
_title = [aCoder decodeObjectForKey:CPViewControllerTitleKey];
|
||||
_cibName = [aCoder decodeObjectForKey:CPViewControllerCibNameKey];
|
||||
_cibBundle = [CPBundle mainBundle];
|
||||
_cibBundle = [aCoder decodeObjectForKey:CPViewControllerBundleKey] || [CPBundle mainBundle];
|
||||
|
||||
_cibExternalNameTable = [CPDictionary dictionaryWithObject:self forKey:CPCibOwner];
|
||||
}
|
||||
|
||||
@@ -200,9 +202,10 @@ var CPViewControllerViewKey = @"CPViewControllerViewKey",
|
||||
{
|
||||
[super encodeWithCoder:aCoder];
|
||||
|
||||
[aCoder encodeObject:_cibName forKey:CPViewControllerCibNameKey];
|
||||
[aCoder encodeObject:_view forKey:CPViewControllerViewKey];
|
||||
[aCoder encodeObject:_title forKey:CPViewControllerTitleKey];
|
||||
[aCoder encodeObject:_cibName forKey:CPViewControllerCibNameKey];
|
||||
[aCoder encodeObject:_cibBundle forKey:CPViewControllerBundleKey];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -30,7 +30,11 @@
|
||||
self = [super NS_initWithCoder:aCoder];
|
||||
|
||||
if (self)
|
||||
{
|
||||
_title = [aCoder decodeObjectForKey:@"NSTitle"];
|
||||
_cibName = [aCoder decodeObjectForKey:@"NSNibName"];
|
||||
_cibBundle = [aCoder decodeObjectForKey:@"NSNibBundleIdentifier"];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user