Moved awakeFromNib to later in the nib loading process.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25605 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2007-11-24 17:39:44 +00:00
parent 00a7c05d91
commit 5c32995867
2 changed files with 16 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2007-11-24 12:38-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/GSNibCompatibility.m: Call awakeFromNib later in the nib
unarchiving process.
2007-11-22 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSNibBindingConnector.m: Completed implementation.

View file

@ -1050,11 +1050,6 @@ static BOOL _isInInterfaceBuilder = NO;
if ([obj respondsToSelector: @selector(nibInstantiate)])
{
newObject = [obj nibInstantiate];
if ([newObject respondsToSelector: @selector(awakeFromNib)])
{
// awaken the object.
[newObject awakeFromNib];
}
}
return newObject;
}
@ -1084,16 +1079,18 @@ static BOOL _isInInterfaceBuilder = NO;
}
}
// instantiate all windows and fill in the top level array.
// iterate over all objects instantiate windows, awaken objects and fill
// in top level array.
en = [objs objectEnumerator];
while ((obj = [en nextObject]) != nil)
{
// instantiate all windows and fill in the top level array.
if ([obj isKindOfClass: [NSWindowTemplate class]])
{
if ([obj realObject] == nil)
{
id o = [self instantiateObject: obj];
[topLevelObjects addObject: o];
obj = [self instantiateObject: obj];
[topLevelObjects addObject: obj];
}
}
else
@ -1104,6 +1101,12 @@ static BOOL _isInInterfaceBuilder = NO;
[topLevelObjects addObject: obj];
}
}
// awaken the object.
if ([obj respondsToSelector: @selector(awakeFromNib)])
{
[obj awakeFromNib];
}
}
// bring visible windows to front...