External storyboards are now working

This commit is contained in:
Gregory John Casamento 2020-07-05 12:39:34 -04:00
parent fa9f75073e
commit 6bf724ab47
2 changed files with 6 additions and 4 deletions

View file

@ -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

View file

@ -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];
}
}