Why am I seeing an extra window?

I am trying to display a custom view along the lines of the Dice project. I have entered code following the updated-for-Swift 2 posts from github, with a few slight modifications for Swift 3, as suggested by Xcode 8.2. I have entered the code up to displaying a window with a gray background (optionally with a green diagonal line).

The “Window”-title window, with the gray background and green diagonal line, does get drawn, but the problem is that behind that window there is a separate, very faint (very faint apparently because that window does not have focus) “DieView”-title window that has no content. I only see the faint “DieView” window if I drag the “Window” window to a different place on the screen.

Xcode displays the following error message in the console after starting the run:

Dice[769:17652] Failed to connect (window) outlet from (Dice.AppDelegate) to (NSWindow): missing setter or instance variable

So what connection do I need to make, and how do I do it?

Ok. Figured it out.

The instruction to delete the object labeled “Dice” in the MainMenu.xib file needs to be changed. In the document outline, that object represents just one part of the menu, so if you only delete that object, the rest of the menu (edit, view, etc) remains and AppDelegate will be trying to display the (non-)window associated with that menu.

I fixed the problem by deleting all of the objects associated with the menu.