Next attempt at getting .nib file loading right. Make sure that

-nibInstantiate is sent to all loaded objects and also make sure that
-awakeFromNib is sent to the nib's owner.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30367 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2010-05-12 14:19:55 +00:00
parent f77c5f6bca
commit 77eaadf3ae
2 changed files with 15 additions and 8 deletions

View file

@ -1,3 +1,10 @@
2010-05-12 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/GSNibLoading.m (-nibInstantiateWithOwner:topLevelObjects:):
Next attempt at getting .nib file loading right. Make sure that
-nibInstantiate is sent to all loaded objects and also make sure
that -awakeFromNib is sent to the nib's owner.
2010-05-12 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSDocumentController.m (-init, -maximumRecentDocumentCount,

View file

@ -1901,8 +1901,7 @@ static BOOL _isInInterfaceBuilder = NO;
// iterate over all objects, instantiate, awaken objects and fill
// in top level array.
// We use the _names map not the _objects map here. This seems to give better results.
objs = NSAllMapTableKeys(_names);
objs = NSAllMapTableKeys(_objects);
en = [objs objectEnumerator];
while ((obj = [en nextObject]) != nil)
{
@ -1917,19 +1916,20 @@ static BOOL _isInInterfaceBuilder = NO;
// objects on behalf of the owner.
RETAIN(obj);
}
}
// awaken all objects.
objs = NSAllMapTableKeys(_objects);
en = [objs objectEnumerator];
while ((obj = [en nextObject]) != nil)
{
// awaken the object.
if ([obj respondsToSelector: @selector(awakeFromNib)])
{
[obj awakeFromNib];
}
}
// awaken the owner
if ([owner respondsToSelector: @selector(awakeFromNib)])
{
[owner awakeFromNib];
}
// bring visible windows to front...
en = [_visibleWindows objectEnumerator];
while ((obj = [en nextObject]) != nil)