Added comments

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22900 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2006-05-11 11:27:01 +00:00
parent 3d56e407b2
commit 51f843db5f
2 changed files with 19 additions and 1 deletions

View file

@ -343,6 +343,19 @@ Class gmodel_class(void)
return NO;
}
table = [NSDictionary dictionaryWithObject: owner forKey: @"NSOwner"];
/*
* First look for the NIB in the bundle corresponding to the owning class,
* since the class may have been loaded dynamically and the bundle may
* contain class-specific NIB resources as well as code.
* If that fails, try to load the NIB from the main application bundle,
* which is where most NIB resources are to be found.
* Possibly this is the wrong order ... since it's conceivable that an
* application may supply an alternative NIB which it would like to have
* used in preference to the one in the classes bundle. However I could
* not find the behavior documented anywhere and the current order is
* most consistent with the the way the code behaved before I changed it.
*/
bundle = [self bundleForClass: [owner class]];
if (bundle != nil && [bundle loadNibFile: aNibName
externalNameTable: table