Fix for the fact that bundles are not encodable in the last commits.

This commit is contained in:
Ross Boucher committed 2009-10-28 00:11:42 -07:00
1 parent d263c74d5d
commit 22c248454e
2 files changed
+5 -3

No files matched your search

+4 -2
View File
@@ -186,7 +186,9 @@ var CPViewControllerViewKey = @"CPViewControllerViewKey",
_view = [aCoder decodeObjectForKey:CPViewControllerViewKey];
_title = [aCoder decodeObjectForKey:CPViewControllerTitleKey];
_cibName = [aCoder decodeObjectForKey:CPViewControllerCibNameKey];
_cibBundle = [aCoder decodeObjectForKey:CPViewControllerBundleKey] || [CPBundle mainBundle];
var bundlePath = [aCoder decodeObjectForKey:CPViewControllerBundleKey];
_cibBundle = bundlePath ? [CPBundle bundleWithPath:bundlePath] : [CPBundle mainBundle];
_cibExternalNameTable = [CPDictionary dictionaryWithObject:self forKey:CPCibOwner];
}
@@ -205,7 +207,7 @@ var CPViewControllerViewKey = @"CPViewControllerViewKey",
[aCoder encodeObject:_view forKey:CPViewControllerViewKey];
[aCoder encodeObject:_title forKey:CPViewControllerTitleKey];
[aCoder encodeObject:_cibName forKey:CPViewControllerCibNameKey];
[aCoder encodeObject:_cibBundle forKey:CPViewControllerBundleKey];
[aCoder encodeObject:[_cibBundle bundlePath] forKey:CPViewControllerBundleKey];
}
@end
+1 -1
View File
@@ -33,7 +33,7 @@
{
_title = [aCoder decodeObjectForKey:@"NSTitle"];
_cibName = [aCoder decodeObjectForKey:@"NSNibName"];
_cibBundle = [aCoder decodeObjectForKey:@"NSNibBundleIdentifier"];
_cibBundle = [CPBundle bundleWithPath:[aCoder decodeObjectForKey:@"NSNibBundleIdentifier"]];
}
return self;