diff --git a/Model/GMAppKit.m b/Model/GMAppKit.m index bf53b0748..ca97bf4c1 100644 --- a/Model/GMAppKit.m +++ b/Model/GMAppKit.m @@ -789,14 +789,13 @@ void __dummy_GMAppKit_functionForLinking() {} @end /* NSMenu (GMArchiverMethods) */ -#if 0 @implementation NSPopUpButton (GMArchiverMethods) - (void)encodeWithModelArchiver:(GMArchiver*)archiver { [archiver encodeBOOL:[self pullsDown] withName:@"pullsDown"]; -#if 0 +#if 1 /* OUCH! This code crashes the translator; probably we interfere somehow with the way NSPopUpButton is handled by the NeXT's NIB code. Sorry, the popup buttons cannot be handled by the convertor! */ @@ -856,7 +855,6 @@ void __dummy_GMAppKit_functionForLinking() {} } @end /* NSPopUpButton (GMArchiverMethods) */ -#endif @implementation NSResponder (GMArchiverMethods) diff --git a/Model/IBClasses.h b/Model/IBClasses.h index 5b095251a..7bb819eb6 100644 --- a/Model/IBClasses.h +++ b/Model/IBClasses.h @@ -85,6 +85,24 @@ BOOL _wtFlags; /* Don't know the type of this ivar */ NSRect screenRect; } + +@end + +@interface NSMenuTemplate : NSObject +{ + NSString *title; + NSPoint location; + id view; + NSString *menuClassName; + id supermenu; + id realObject; + id extension; + BOOL isWindowsMenu; + BOOL isRequestMenu; + BOOL isFontMenu; + char interfaceStyle; + char *cMenuClassName; +} @end #endif /* _GNUstep_H_IBClasses */ diff --git a/Model/IBClasses.m b/Model/IBClasses.m index cf0e08c03..58cd9ae50 100644 --- a/Model/IBClasses.m +++ b/Model/IBClasses.m @@ -43,6 +43,17 @@ //#define DEBUG +#if 0 +@implementation NSObject (NibToGModel) +- (id)awakeAfterUsingCoder:(NSCoder*)aDecoder +{ + NSLog (@"%x awakeAfterUsingCoder: %@ [%@]", self, [self class], self); + return self; +} + +@end +#endif + @implementation NSCustomObject (NibToGModel) - (id)awakeAfterUsingCoder:(NSCoder*)aDecoder { @@ -219,3 +230,27 @@ @end +@implementation NSMenuTemplate (NibToGModel) +- (id)awakeAfterUsingCoder:(NSCoder*)aDecoder +{ +#ifdef DEBUG + NSLog (@"%x awakeAfterUsingCoder NSMenuTemplate: className = %@, realObject = %@, " + @"extension = %@", self, menuClassName, realObject, extension); +#endif + /* This is just a hack till we figure out what's going on */ + if ([menuClassName isEqual: @"NSPopUpList"]) + [self retain]; + return self; +} + +- (void)encodeWithModelArchiver:(GMArchiver*)archiver +{ + [archiver encodeString:menuClassName withName:@"menuClassName"]; + if (realObject) + [archiver encodeObject:realObject withName:@"realObject"]; + if (extension) + [archiver encodeObject:extension withName:@"extension"]; +} + +@end +