mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-23 06:20:47 +00:00
Update nib loader to fix issues with saving a gorm file from a nib
This commit is contained in:
parent
fe40179309
commit
4ee131dbda
1 changed files with 25 additions and 8 deletions
|
@ -143,8 +143,6 @@
|
|||
/*
|
||||
* Special internal classes
|
||||
*/
|
||||
[u setClass: [GormObjectProxy class]
|
||||
forClassName: @"NSCustomObject"];
|
||||
[u setClass: [GormCustomView class]
|
||||
forClassName: @"NSCustomView"];
|
||||
[u setClass: [GormWindowTemplate class]
|
||||
|
@ -185,7 +183,7 @@
|
|||
//
|
||||
// set the current class on the File's owner...
|
||||
//
|
||||
if([_nibFilesOwner isKindOfClass: [GormObjectProxy class]])
|
||||
if([_nibFilesOwner isKindOfClass: [NSCustomObject class]])
|
||||
{
|
||||
[docFilesOwner setClassName: [_nibFilesOwner className]];
|
||||
}
|
||||
|
@ -200,9 +198,25 @@
|
|||
NSString *objName = nil;
|
||||
|
||||
// skip the file's owner, it is handled above...
|
||||
if(o == _nibFilesOwner)
|
||||
continue;
|
||||
|
||||
if(o == _nibFilesOwner
|
||||
|| o == [document firstResponder])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//
|
||||
// If it's NSApplication (most likely the File's Owner)
|
||||
// skip it...
|
||||
//
|
||||
if ([o isKindOfClass: [NSCustomObject class]])
|
||||
{
|
||||
if ([[o className] isEqualToString: @"NSApplication"])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
customClassName = [o className];
|
||||
}
|
||||
|
||||
//
|
||||
// if it's a window template, then replace it with an actual window.
|
||||
//
|
||||
|
@ -218,14 +232,17 @@
|
|||
|
||||
[document setObject: obj isDeferred: isDeferred];
|
||||
[document setObject: obj isVisibleAtLaunch: isVisible];
|
||||
|
||||
|
||||
[document attachObject: obj
|
||||
toParent: nil];
|
||||
|
||||
// record the custom class...
|
||||
if([classManager isCustomClass: className])
|
||||
{
|
||||
customClassName = className;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if([self isTopLevelObject: obj])
|
||||
{
|
||||
[document attachObject: obj
|
||||
|
|
Loading…
Reference in a new issue