mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Correct the instantiation of NIB bindings. Should fix bug #34644.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34098 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c72e465a66
commit
16e01f25a1
3 changed files with 34 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2011-10-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSNibLoading.m ([NSNibConnector-nibInstantiate]): Add
|
||||
this method.
|
||||
* Source/GSXibLoader.m ([IBBindingConnection-nibInstantiate):
|
||||
Instantiate the connector.
|
||||
|
||||
2011-10-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSPopUpButton.m,
|
||||
|
|
|
@ -1573,6 +1573,20 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
[self setSource: [instantiator instantiateObject: _src]];
|
||||
[self setDestination: [instantiator instantiateObject: _dst]];
|
||||
}
|
||||
|
||||
- (id) nibInstantiate
|
||||
{
|
||||
if ([_src respondsToSelector: @selector(nibInstantiate)])
|
||||
{
|
||||
[self setSource: [_src nibInstantiate]];
|
||||
}
|
||||
if ([_dst respondsToSelector: @selector(nibInstantiate)])
|
||||
{
|
||||
[self setDestination: [_dst nibInstantiate]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSNibControlConnector (NibCompatibility)
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
- (void) setRealObject: (id)obj;
|
||||
@end
|
||||
|
||||
@interface NSNibConnector (NibCompatibility)
|
||||
- (id) nibInstantiate;
|
||||
@end
|
||||
|
||||
@implementation FirstResponder
|
||||
|
||||
+ (id) allocWithZone: (NSZone*)zone
|
||||
|
@ -341,6 +345,9 @@
|
|||
- (id) initWithCoder: (NSCoder*)coder
|
||||
{
|
||||
self = [super initWithCoder: coder];
|
||||
if (self == nil)
|
||||
return nil;
|
||||
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
if ([coder containsValueForKey: @"connector"])
|
||||
|
@ -352,6 +359,12 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) nibInstantiate
|
||||
{
|
||||
[connector nibInstantiate];
|
||||
return [super nibInstantiate];
|
||||
}
|
||||
|
||||
- (void) establishConnection
|
||||
{
|
||||
[connector establishConnection];
|
||||
|
|
Loading…
Reference in a new issue