Where is the instance of DieView?

Just before Fig. 17.4 it says “the view is not yet an instance of DieView.” So we set the view’s class to DieView, and it works. Question: what is the instance of DieView? I want to use it to call a custom function inside the view class, but I do not know the instance variable’s (or constant’s) name.

After you change the class name for the custom view in Interface Builder, you’ll need to add an IBOutlet in your mainWindowController and wire it to the instance of DieView. You will then be able to call methods on the instance of DieView from within MainWindowController

Ken, thank you very much. I would not have guessed to do as you indicated, but in hindsight it seems clear enough. This puzzle had me scratching my head for two days. It is interesting when following the code in the debugger because it gets to the line (inside a windowWillResize() delegate) where I call the method in the subclassed NSView, then jumps to the @IBOutlet, back to the method call, and finally into the method itself.