Pardon all the noob postings – I’m just learning Xcode and Swift and the way things are done is just so alien to me. I’m trying, though!
For others coming here, if you get to p. 21 (Fig. 1.24) and you find that clicking the Generate Password button doesn’t do anything, it may be because you didn’t do the control-drag correctly from the button to “File’s Owner”. (I learned this the hard way). To fix things, do the following three things:
To undo a bad link: Do the instructions at the bottom of p. 21. That will delete the link and let you try again.
To prevent the “Stop RandomPassword?” error message: Don’t stop the Password Generator program by closing it (i.e., by clicking the red button in the upper left corner). It won’t fully terminate that way. Instead, stop the program by clicking anywhere on the Xcode window and clicking Product > Stop.
To make a proper link: Click the Generate Password button on the form one time. If you do this correctly, you should see handles (small squares) on the sides of the button (see Fig. 1.22). Hold down the Ctrl key and keep it pressed down. While holding the control key down, drag the button to File’s Owner. You should see a blue balloon move up to File’s Owner. Release the mouse. Release the Ctrl key. You should see the black dialog box shown in Fig. 1.22. Click “generatePassword:” and you’re done. You should be able to run the program now.