mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
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:
parent
f77c5f6bca
commit
77eaadf3ae
2 changed files with 15 additions and 8 deletions
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue