2 Windows appearing on running the program

Hi,

This is first time I am posting on this forum. Please be easy on me.

I followed the chapter 1 step by step and I changed the required things as per new swift 2 changes. I am able to run the application, as expected.

Problem I am facing is whenever I run the application, It opens 2 windows, First one which has no controls on canvas, is empty and second one which I have resized and which have textfield and button on it, which is programmed to generate random password.

I thought,as mentioned on page 81 - Improving the controller design would help in sorting this issue and after that we will only see the MainControllerWindow only, but even after making the changes as suggested by author, I am still seeing 2 windows, 1 which is blank and the other one which is Random Password window with controls on it.

I downloaded the author’s code from Github and matched each and every line to match and find the difference and understand what I might be doing wrong, but there is no difference.

Can anyone help me understand, what I might be doing wrong?

Screenshot attached for reference.

Ishan

You probably forgot to delete the original window from the storyboard that comes with the default project.

Hey,

Yes, So stupid of me, I actually got confused and deleted the first Menu Item → Password Generator instead of deleting the window from canvas.

Its sorted now. Thank you!

btw, is there anyway of getting back the original first menu item Password Generator which I deleted?

Mhmm, not that I know of. Just create a new empty project and try copying it from there :wink: