Connecting the Model Layer to the Controller

In MainWindowController.swift, update generatePassword(_:) to call generateRandomString() with a constant length.

i​m​p​o​r​t​ ​C​o​c​o​a​ c​l​a​s​s​ ​M​a​i​n​W​i​n​d​o​w​C​o​n​t​r​o​l​l​e​r​:​ ​N​S​W​i​n​d​o​w​C​o​n​t​r​o​l​l​e​r​ ​{​ ​ ​ ​ ​@​I​B​O​u​t​l​e​t​ ​w​e​a​k​ ​v​a​r​ ​t​e​x​t​F​i​e​l​d​:​ ​N​S​T​e​x​t​F​i​e​l​d​!​ ​ ​ ​ ​o​v​e​r​r​i​d​e​ ​f​u​n​c​ ​w​i​n​d​o​w​D​i​d​L​o​a​d​(​)​ ​{​ ​ ​ ​ ​ ​ ​ ​ ​s​u​p​e​r​.​w​i​n​d​o​w​D​i​d​L​o​a​d​(​)​ ​ ​ ​ ​ ​ ​ ​ ​/​/​ ​I​m​p​l​e​m​e​n​t​ ​t​h​i​s​ ​m​e​t​h​o​d​ ​t​o​ ​h​a​n​d​l​e​ ​a​n​y​ ​i​n​i​t​i​a​l​i​z​a​t​i​o​n​ ​a​f​t​e​r​ ​y​o​u​r​ ​ ​ ​ ​ ​ ​ ​ ​/​/​ ​w​i​n​d​o​w​ ​c​o​n​t​r​o​l​l​e​r​'​s​ ​w​i​n​d​o​w​ ​h​a​s​ ​b​e​e​n​ ​l​o​a​d​e​d​ ...

Get Cocoa Programming for OS X: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.