mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-28 19:08:50 +00:00
nib2cib support for CPView identifier property.
This commit is contained in:
1 parent
392702cc18
commit
5a99011feb
2 files changed
+9
-2
No files matched your search
+6
-2
@@ -2716,7 +2716,8 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
CPViewThemeStateKey = @"CPViewThemeStateKey",
|
||||
CPViewWindowKey = @"CPViewWindowKey",
|
||||
CPViewNextKeyViewKey = @"CPViewNextKeyViewKey",
|
||||
CPViewPreviousKeyViewKey = @"CPViewPreviousKeyViewKey";
|
||||
CPViewPreviousKeyViewKey = @"CPViewPreviousKeyViewKey",
|
||||
CPReuseIdentifierKey = @"CPReuseIdentifierKey";
|
||||
|
||||
@implementation CPView (CPCoding)
|
||||
|
||||
@@ -2749,7 +2750,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
_window = [aCoder decodeObjectForKey:CPViewWindowKey];
|
||||
_subviews = [aCoder decodeObjectForKey:CPViewSubviewsKey] || [];
|
||||
_superview = [aCoder decodeObjectForKey:CPViewSuperviewKey];
|
||||
|
||||
_identifier = [aCoder decodeObjectForKey:CPReuseIdentifierKey];
|
||||
// FIXME: Should we encode/decode this?
|
||||
_registeredDraggedTypes = [CPSet set];
|
||||
_registeredDraggedTypesArray = [];
|
||||
@@ -2890,6 +2891,9 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
for (var attributeName in _themeAttributes)
|
||||
if (_themeAttributes.hasOwnProperty(attributeName))
|
||||
CPThemeAttributeEncode(aCoder, _themeAttributes[attributeName]);
|
||||
|
||||
if (_identifier)
|
||||
[aCoder encodeObject:_identifier forKey:CPReuseIdentifierKey];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -72,6 +72,9 @@ var NSViewAutoresizingMask = 0x3F,
|
||||
_themeAttributes = {};
|
||||
_themeState = CPThemeStateNormal;
|
||||
[self _loadThemeAttributes];
|
||||
|
||||
if ([aCoder containsValueForKey:@"NSReuseIdentifierKey"])
|
||||
_identifier = [aCoder decodeObjectForKey:@"NSReuseIdentifierKey"];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
Reference in new issue
Block a user