I'm running OS X (10.12.1), Xcode 8.1 and Swift 3 on my MacBook Pro (all are updated automatically). For a MacOS application (not iOS), I want to show an alert when an invalid user entry is input. I've researched a zillion examples and tried many of them, but none work. And, a good number of them send my Playground into a loop (dreaded color wheel) from which I have to reboot (the latest of these is attached).
My question is: What is the proper Swift 3 code to create an alert in the environment and the conditions described above occur?