title: Alert with password input in Swift OS X
body: <p>I am trying to create a OS X app using Swift, and it's been going well until now!</p>
  
  <p>What I want to do is prompt user to enter a password in an alert (or any dialog really), save it in a variable and use it later on. Now, this app is just to get my hands dirty, so I don't even want the input box to be secure. It just needs to popup and ask for text input.</p>
  
  <p>I have looked everywhere. Scanned the <code>NSAlert</code> reference, there seems to be no easy way of doing this. In contrast, on iOS <code>UIAlertController</code> does this very easily.</p>
  
  <p>What I tried to do is create an <code>NSAlert</code> instance and modify its <code>AccessoryView</code> as suggested in <a href="https://developer.apple.com/library/prerelease/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAlert_Class/index.html#//apple_ref/occ/instp/NSAlert/accessoryView" rel="nofollow">NSAlert Class Reference</a>, but that does not let me add an <code>NSTextField</code>.</p>
  
  <p>Is there something I'm missing, or I can't find any examples because it's bad design?</p>