diff --git a/Headers/AppKit/NSPathControlItem.h b/Headers/AppKit/NSPathControlItem.h index 08966d278..10743aa0e 100644 --- a/Headers/AppKit/NSPathControlItem.h +++ b/Headers/AppKit/NSPathControlItem.h @@ -33,7 +33,7 @@ extern "C" { #endif - @class NSURL, NSAttributedString, NSImage, NSString; +@class NSURL, NSAttributedString, NSImage, NSString; @interface NSPathControlItem : NSObject { @@ -64,4 +64,3 @@ extern "C" { #endif /* GS_API_MACOSX */ #endif /* _NSPathControlItem_h_GNUSTEP_GUI_INCLUDE */ - diff --git a/Source/NSPathCell.m b/Source/NSPathCell.m index fcb2085eb..53741eaf7 100644 --- a/Source/NSPathCell.m +++ b/Source/NSPathCell.m @@ -208,7 +208,8 @@ { [self setPathStyle: NSPathStyleStandard]; - // if ([coder containsValueForKey: @"NSPathStyle"]) + // if ([coder containsValueForKey: @"NSPathStyle"]) // can't seem to find it in the contains method, + // but it does when I decode it... not sure why. { [self setPathStyle: [coder decodeIntegerForKey: @"NSPathStyle"]]; } @@ -220,11 +221,31 @@ } else { + [coder decodeValueObjCType: @encode(NSUInteger) + at: &_pathStyle]; + [self setPathComponentCells: [coder decodeObject]]; } return self; } +- (void) encodeWithCoder: (NSCoder *)coder +{ + if ([coder allowsKeyedCoding]) + { + [coder encodeInteger: [self pathStyle] + forKey: @"NSPathStyle"]; + [coder encodeObject: [self pathComponentCells] + forKey: @"NSPathComponentCells"] + } + else + { + [coder encodeValueObjCType: @encode(NSUInteger) + at: &_pathStyle]; + [coder encodeObject: [self pathComponentCells]]; + } +} + @end @implementation NSPathCell (Private)