Decoding of NSPathCell objects is working.

This commit is contained in:
Gregory John Casamento 2020-05-02 05:12:54 -04:00
parent 4591d8b60b
commit f597a389de
2 changed files with 13 additions and 8 deletions

View file

@ -2743,11 +2743,6 @@ didStartElement: (NSString*)elementName
return num;
}
- (id) decodePathComponentCells: (GSXibElement *)element
{
return nil;
}
- (id) decodePathStyle: (GSXibElement *)element
{
NSNumber *num = [NSNumber numberWithInteger: 0];
@ -2769,6 +2764,17 @@ didStartElement: (NSString*)elementName
return num;
}
- (id) decodePathComponentCells: (GSXibElement *)element
{
id object = nil;
NSArray *array = nil;
object = [self decodeObjectForKey: @"cell"];
array = [NSArray arrayWithObject: object];
return array;
}
- (id) objectForXib: (GSXibElement*)element
{
id object = [super objectForXib: element];
@ -3211,7 +3217,7 @@ didStartElement: (NSString*)elementName
}
else if ([@"NSPathComponentCells" isEqualToString: key])
{
hasValue = [currentElement elementForKey: @"pathCell"] != nil;
hasValue = [currentElement elementForKey: @"cell"] != nil;
}
else if ([@"NSHeaderClipView" isEqualToString: key])
{

View file

@ -185,12 +185,11 @@
// Defaults for some values which aren't encoded unless they are non-default.
[self setBackgroundColor: [NSColor windowBackgroundColor]];
[self setPathStyle: NSPathStyleStandard];
if ([coder containsValueForKey: @"NSPathComponentCells"])
{
[self setPathComponentCells: [coder decodeObjectForKey: @"NSPathComponentCells"]];
}
if ([coder containsValueForKey: @"NSPathStyle"])
{
[self setPathStyle: [coder decodeIntegerForKey: @"NSPathStyle"]];