Get the class NSNib to work and use it in NSBundleAdditions.

Restructure top level object handling for NIB loading.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30018 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2010-03-22 09:08:50 +00:00
parent ec2ea1114d
commit 444b0fc6db
9 changed files with 122 additions and 126 deletions

View file

@ -38,9 +38,11 @@
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSException.h>
#import <Foundation/NSString.h>
#import <Foundation/NSURL.h>
#import <Foundation/NSUserDefaults.h>
#import <Foundation/NSKeyValueCoding.h>
#import <AppKit/NSControl.h>
#import "AppKit/NSControl.h"
#import "AppKit/NSNib.h"
#import "AppKit/NSNibConnector.h"
#import "AppKit/NSNibLoading.h"
#import "GNUstepGUI/GSModelLoaderFactory.h"
@ -229,10 +231,11 @@
externalNameTable: (NSDictionary*)context
withZone: (NSZone*)zone
{
GSModelLoader *loader = [GSModelLoaderFactory modelLoaderForFileName: fileName];
BOOL loaded = [loader loadModelFile: fileName
externalNameTable: context
withZone: zone];
NSNib *nib = [[NSNib alloc] initWithContentsOfURL: [NSURL fileURLWithPath: fileName]];
BOOL loaded = [nib instantiateNibWithExternalNameTable: context
withZone: zone];
RELEASE(nib);
return loaded;
}
@ -246,7 +249,7 @@
{
return NO;
}
table = [NSDictionary dictionaryWithObject: owner forKey: @"NSOwner"];
table = [NSDictionary dictionaryWithObject: owner forKey: @"NSNibOwner"];
/*
* First look for the NIB in the bundle corresponding to the owning class,