toggle quoted messageShow quoted text
Thanks a lot!
I was just about coming to the same conclusion and was trying to figure out how to get the ViewController from the Window and then your message arrived.
That fixed it! All working well now!
On 16 Jan 2020, at 20:27, Jon Gotow <gotow@...> wrote:
Oh - there you go. Assuming that myGameWindowController is the parent window controller that manages myGameViewController, it will create an instance of your LTWMacGameViewController class when it loads. Calling [myStoryboard instantiateControllerWithIdentifier:kLTWGameMainViewControllerID] afterwards will create another instance of LTWMacGameViewController that's just floating in memory, not referenced by the window controller.
What you want to do is get the instance of LTWMacGameViewController that's managed by the window controller. Do this instead:
myGameViewController = myGameWindowController.contentViewController;
That'll fix it.
On Jan 16, 2020, at 11:38 AM, Dave <dave@...> wrote:
//** Instantiate the Game Window Controller
myStoryboard = [NSStoryboard storyboardWithName:kLTWGameStoryboardName bundle:nil];
myGameWindowController = [myStoryboard instantiateControllerWithIdentifier:kLTWGameMainWindowControllerID];
if (myGameWindowController == nil)
//** Instantiate the Game View Controller
myGameViewController = [myStoryboard instantiateControllerWithIdentifier:kLTWGameMainViewControllerID];
if (myGameViewController == nil)