mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 12:00:45 +00:00
Minor fix in NSNib to use NULL, quick fix in NSBundleAdditions to fix issue with model not returning top-level objects
This commit is contained in:
parent
b003db284e
commit
530dee1e2f
3 changed files with 29 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2024-08-29 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSBundleAdditions.m: Quick fix for .gorm loading
|
||||
not returning top level objects.
|
||||
|
||||
2024-08-18 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Headers/AppKit/NSTreeController.h: Update header
|
||||
|
|
|
@ -165,8 +165,30 @@
|
|||
|
||||
if (owner != nil && aNibName != nil)
|
||||
{
|
||||
NSDictionary *table = [NSDictionary dictionaryWithObject: owner forKey: NSNibOwner];
|
||||
NSDictionary *table = nil;
|
||||
NSMutableArray *tlo = nil;
|
||||
|
||||
// Based on the arguments above, set up the table appropriately...
|
||||
if (owner != nil)
|
||||
{
|
||||
if (topLevelObjects != NULL)
|
||||
{
|
||||
// Here we initialize the array, it is sent in using the dictionary.
|
||||
// In the code below it is pulled back out and assigned to the
|
||||
// reference in the arguments.
|
||||
tlo = [NSMutableArray array];
|
||||
table = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
owner, NSNibOwner,
|
||||
tlo, NSNibTopLevelObjects,
|
||||
nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
table = [NSDictionary dictionaryWithObject: owner forKey: NSNibOwner];
|
||||
}
|
||||
}
|
||||
|
||||
// Attempt to load the model file...
|
||||
success = [self loadNibFile: aNibName
|
||||
externalNameTable: table
|
||||
withZone: [owner zone]];
|
||||
|
|
|
@ -209,7 +209,7 @@
|
|||
// add the necessary things to the table...
|
||||
[externalNameTable setObject: owner forKey: NSNibOwner];
|
||||
|
||||
if (topLevelObjects != 0)
|
||||
if (topLevelObjects != NULL)
|
||||
{
|
||||
*topLevelObjects = [NSMutableArray array];
|
||||
[externalNameTable setObject: *topLevelObjects
|
||||
|
|
Loading…
Reference in a new issue