mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
External storyboards are now working
This commit is contained in:
parent
fa9f75073e
commit
6bf724ab47
2 changed files with 6 additions and 4 deletions
|
@ -281,6 +281,7 @@ static NSStoryboard *__mainStoryboard = nil;
|
|||
|
||||
- (NSString *) storyboardName;
|
||||
- (void) setStoryboardName: (NSString *)name;
|
||||
- (id) instantiate;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -331,12 +332,11 @@ static NSStoryboard *__mainStoryboard = nil;
|
|||
// this is never encoded directly...
|
||||
}
|
||||
|
||||
- (void) instantiate
|
||||
- (id) instantiate
|
||||
{
|
||||
NSLog(@".... instantiate placeholder ....");
|
||||
_storyboard = [NSStoryboard storyboardWithName: _storyboardName
|
||||
bundle: [NSBundle mainBundle]];
|
||||
[_storyboard instantiateInitialController];
|
||||
return [_storyboard instantiateInitialController];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -952,7 +952,7 @@ static NSStoryboard *__mainStoryboard = nil;
|
|||
while ((o = [en nextObject]) != nil)
|
||||
{
|
||||
NSControllerPlaceholder *ph = (NSControllerPlaceholder *)o;
|
||||
[ph instantiate];
|
||||
result = [ph instantiate];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -109,6 +109,7 @@
|
|||
NSWindow *w = [_sourceController window];
|
||||
NSView *v = [_destinationController view];
|
||||
[w setContentView: v];
|
||||
[w setTitle: [_destinationController title]];
|
||||
[_sourceController showWindow: self];
|
||||
}
|
||||
else if ([_kind isEqualToString: @"modal"])
|
||||
|
@ -136,6 +137,7 @@
|
|||
else
|
||||
{
|
||||
NSWindow *w = [NSWindow windowWithContentViewController: _destinationController];
|
||||
[w setTitle: [_destinationController title]];
|
||||
[w orderFrontRegardless];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue