mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 18:21:08 +00:00
Merge with gui main branch revision 39484
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@39488 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2e68003300
commit
6360094289
1 changed files with 20 additions and 9 deletions
|
@ -919,24 +919,35 @@
|
|||
id owner = [context objectForKey: NSNibOwner];
|
||||
id first = nil;
|
||||
id app = nil;
|
||||
NSCustomObject *object;
|
||||
NSString *className;
|
||||
|
||||
// Get the file's owner and NSApplication object references...
|
||||
if ([[(NSCustomObject*)[rootObjects objectAtIndex: 1] className] isEqualToString: @"FirstResponder"])
|
||||
first = [(NSCustomObject*)[rootObjects objectAtIndex: 1] realObject];
|
||||
object = (NSCustomObject*)[rootObjects objectAtIndex: 1];
|
||||
if ([[object className] isEqualToString: @"FirstResponder"])
|
||||
{
|
||||
first = [object realObject];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"%s:first responder missing\n", __PRETTY_FUNCTION__);
|
||||
}
|
||||
|
||||
id object = [rootObjects objectAtIndex: 2];
|
||||
NSString *className = [(NSCustomObject*)object className];
|
||||
Class theClass = NSClassFromString(className);
|
||||
BOOL isAppClass = [theClass isSubclassOfClass:[NSApplication class]];
|
||||
if (isAppClass)
|
||||
app = [(NSCustomObject*)[rootObjects objectAtIndex: 2] realObject];
|
||||
object = (NSCustomObject*)[rootObjects objectAtIndex: 2];
|
||||
className = [object className];
|
||||
if ([className isEqualToString: @"NSApplication"] ||
|
||||
[NSClassFromString(className) isSubclassOfClass:[NSApplication class]])
|
||||
{
|
||||
app = [object realObject];
|
||||
}
|
||||
else
|
||||
NSLog(@"%s:NSApplication missing\n", __PRETTY_FUNCTION__);
|
||||
{
|
||||
NSLog(@"%s:NSApplication missing '%@'\n", __PRETTY_FUNCTION__, className);
|
||||
}
|
||||
|
||||
// Use the owner as first root object
|
||||
[(NSCustomObject*)[rootObjects objectAtIndex: 0] setRealObject: owner];
|
||||
|
||||
en = [rootObjects objectEnumerator];
|
||||
while ((obj = [en nextObject]) != nil)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue