mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-14 10:43:50 +00:00
Encode delegate when archiving CPBrowser.
This commit is contained in:
1 parent
6019ff9107
commit
0240c648aa
2 files changed
+7
No files matched your search
@@ -673,6 +673,8 @@
|
||||
_imageWidth = [aCoder decodeFloatForKey:@"CPBrowserImageWidthKey"];
|
||||
_minColumnWidth = [aCoder decodeFloatForKey:@"CPBrowserMinColumnWidthKey"];
|
||||
_columnWidths = [aCoder decodeObjectForKey:@"CPBrowserColumnWidthsKey"];
|
||||
|
||||
[self setDelegate:[aCoder decodeObjectForKey:@"CPBrowserDelegateKey"]];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -689,6 +691,7 @@
|
||||
[aCoder encodeBool:[self autohidesScroller] forKey:@"CPBrowserAutohidesScrollerKey"];
|
||||
[aCoder encodeBool:_allowsEmptySelection forKey:@"CPBrowserAllowsEmptySelectionKey"];
|
||||
[aCoder encodeBool:_allowsMultipleSelection forKey:@"CPBrowserAllowsMultipleSelectionKey"];
|
||||
[aCoder encodeObject:_delegate forKey:@"CPBrowserDelegateKey"];
|
||||
[aCoder encodeObject:_prototypeView forKey:@"CPBrowserPrototypeViewKey"];
|
||||
[aCoder encodeFloat:_rowHeight forKey:@"CPBrowserRowHeightKey"];
|
||||
[aCoder encodeFloat:_imageWidth forKey:@"CPBrowserImageWidthKey"];
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
{
|
||||
// This should preferably not crash.
|
||||
var decoded = [CPKeyedUnarchiver unarchiveObjectWithData:[CPKeyedArchiver archivedDataWithRootObject:browser]];
|
||||
|
||||
// This basic test will serve to verify that the decoded object is not broken.
|
||||
browser = decoded;
|
||||
[self testRows];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in new issue
Block a user