mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Fix bug where some objects loaded from a .xib file were not sent an
-awakeFromNib message. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30365 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2d56513a18
commit
cfb8299e07
2 changed files with 29 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-05-12 Wolfgang Lux <wlux@uni-muenster.de>
|
||||
|
||||
* Source/GSXibLoader.m (-awakeData:withContext): Fix bug where
|
||||
some objects from the xib file were not sent an -awakeFromNib
|
||||
message.
|
||||
|
||||
2010-05-12 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Headers/AppKit/NSMenu.h:
|
||||
|
|
|
@ -394,6 +394,7 @@
|
|||
id children;
|
||||
id parent;
|
||||
}
|
||||
- (id) object;
|
||||
@end
|
||||
|
||||
@implementation IBObjectRecord
|
||||
|
@ -436,12 +437,18 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) object
|
||||
{
|
||||
return object;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface IBMutableOrderedSet: NSObject
|
||||
{
|
||||
NSArray *orderedObjects;
|
||||
}
|
||||
- (NSArray *)orderedObjects;
|
||||
@end
|
||||
|
||||
@implementation IBMutableOrderedSet
|
||||
|
@ -469,6 +476,10 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSArray *)orderedObjects
|
||||
{
|
||||
return orderedObjects;
|
||||
}
|
||||
@end
|
||||
|
||||
@interface IBObjectContainer: NSObject <NSCoding>
|
||||
|
@ -483,6 +494,7 @@
|
|||
int maxID;
|
||||
}
|
||||
- (id) nibInstantiate;
|
||||
- (NSEnumerator *) objectRecordEnumerator;
|
||||
@end
|
||||
|
||||
@implementation IBObjectContainer
|
||||
|
@ -543,6 +555,11 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (NSEnumerator *) objectRecordEnumerator
|
||||
{
|
||||
return [[objectRecords orderedObjects] objectEnumerator];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -632,8 +649,13 @@
|
|||
// add the menu...
|
||||
[NSApp _setMainMenu: obj];
|
||||
}
|
||||
}
|
||||
|
||||
// awaken the object.
|
||||
// awaken all objects.
|
||||
en = [objects objectRecordEnumerator];
|
||||
while ((obj = [en nextObject]) != nil)
|
||||
{
|
||||
obj = [obj object];
|
||||
if ([obj respondsToSelector: @selector(awakeFromNib)])
|
||||
{
|
||||
[obj awakeFromNib];
|
||||
|
|
Loading…
Reference in a new issue