diff --git a/GormCore/GormWrapperLoader.m b/GormCore/GormWrapperLoader.m index 0c75c543..fda43b31 100644 --- a/GormCore/GormWrapperLoader.m +++ b/GormCore/GormWrapperLoader.m @@ -59,14 +59,14 @@ static GormWrapperLoaderFactory *_sharedWrapperLoaderFactory = nil; { NSMutableArray *images = [NSMutableArray array]; NSMutableArray *sounds = [NSMutableArray array]; + NSArray *imageFileTypes = [NSImage imageFileTypes]; + NSArray *soundFileTypes = [NSSound soundUnfilteredFileTypes]; document = doc; // don't retain... if ([wrapper isDirectory]) { NSDictionary *fileWrappers = nil; NSString *key = nil; - NSArray *imageFileTypes = [NSImage imageFileTypes]; - NSArray *soundFileTypes = [NSSound soundUnfilteredFileTypes]; NSEnumerator *enumerator = nil; key = nil; @@ -106,6 +106,14 @@ static GormWrapperLoaderFactory *_sharedWrapperLoaderFactory = nil; } } } + else if ([wrapper isRegularFile]) // handle wrappers which are just plain files... + { + + } + else + { + NSLog(@"Unsupported wrapper type"); + } // fill in the images and sounds arrays... [document setSounds: sounds]; diff --git a/Plugins/Xib/GormXibWrapperLoader.m b/Plugins/Xib/GormXibWrapperLoader.m index a4dc8af4..02ae3ab8 100644 --- a/Plugins/Xib/GormXibWrapperLoader.m +++ b/Plugins/Xib/GormXibWrapperLoader.m @@ -49,18 +49,14 @@ NS_DURING { - // NSData *classes = nil; - // NSString *key = nil; GormPalettesManager *palettesManager = [(id)NSApp palettesManager]; NSDictionary *substituteClasses = [palettesManager substituteClasses]; NSString *subClassName = nil; - // NSDictionary *fileWrappers = nil; - + if ([super loadFileWrapper: wrapper - withDocument: doc] && + withDocument: doc] && [wrapper isDirectory] == NO) { - // NSString *path = [[wrapper filename] stringByDeletingLastPathComponent]; NSData *data = [wrapper regularFileContents]; GormClassManager *classManager = [document classManager]; id docFilesOwner; @@ -76,13 +72,14 @@ else { NSEnumerator *en; - GSXibKeyedUnarchiver *u; + NSKeyedUnarchiver *u; // using superclass for its interface. + // - // Create an unarchiver, and use it to unarchive the gorm file while + // Create an unarchiver, and use it to unarchive the xib file while // handling class replacement so that standard objects understood // by the gui library are converted to their Gorm internal equivalents. // - u = [[GSXibKeyedUnarchiver alloc] initForReadingWithData: data]; + u = [GSXibKeyedUnarchiver unarchiverForReadingWithData: data]; [u setDelegate: self]; //