mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Add call to allowsKeyedCoding to determine if encoding should be done for NSProxyObject
This commit is contained in:
parent
a354fb0f7f
commit
6e954298e2
1 changed files with 20 additions and 17 deletions
|
@ -87,26 +87,29 @@ static NSString *ApplicationClass = nil;
|
|||
{
|
||||
self = [super initWithCoder: coder];
|
||||
|
||||
if (self)
|
||||
if (self != nil)
|
||||
{
|
||||
// If we've not set the general application class yet...
|
||||
if (_className && (ApplicationClass == nil) &&
|
||||
([NSClassFromString(_className) isKindOfClass: [NSApplication class]]))
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGNCOPY(ApplicationClass, _className);
|
||||
}
|
||||
|
||||
_userLabel = [coder decodeObjectForKey: @"userLabel"];
|
||||
|
||||
// Override this one type...
|
||||
if (_userLabel)
|
||||
{
|
||||
if ([@"Application" isEqualToString: _userLabel])
|
||||
// If we've not set the general application class yet...
|
||||
if (_className && (ApplicationClass == nil) &&
|
||||
([NSClassFromString(_className) isKindOfClass: [NSApplication class]]))
|
||||
{
|
||||
if (ApplicationClass == nil)
|
||||
ASSIGN(_className, @"NSApplication");
|
||||
else
|
||||
ASSIGN(_className, ApplicationClass);
|
||||
ASSIGNCOPY(ApplicationClass, _className);
|
||||
}
|
||||
|
||||
_userLabel = [coder decodeObjectForKey: @"userLabel"];
|
||||
|
||||
// Override this one type...
|
||||
if (_userLabel)
|
||||
{
|
||||
if ([@"Application" isEqualToString: _userLabel])
|
||||
{
|
||||
if (ApplicationClass == nil)
|
||||
ASSIGN(_className, @"NSApplication");
|
||||
else
|
||||
ASSIGN(_className, ApplicationClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue