3 Replies
      Latest reply on Aug 1, 2015 10:05 AM by SpaceMan
      SpaceMan Level 1 Level 1 (10 points)

        Can someone tell me why this is happening?

         

        I have converted an OS X app to use Storyboards.  Some of my NSViewControllers have an associated NSWindowController.  I created a 'window content' relationship from the Window Controller to the View Controller.

        I create a segue to the Window Controller.  In prepareForSegue, I get the destination controller, which is the window controller, but I really want the contentViewController.  However, the issue is that the contentViewController is nil.  I want to do something like the following.

         

        NSWindowController *wc = [segue destinationController];

        MyViewController *mvc = (MyViewController *)wc.window.contentViewController;

         

        But looking at wc in the debugger, its contentViewController is nil.