title: How to add NSMenu Programmatically?
body: <p><strong>I didn't use storyboard and xib, just used only code.</strong>
  I would like to add "Edit" Menu Programmatically. My Questions are</p>
  
  <p>1) How to show "Edit" Menu / What codes need to input at comment Question 1)?</p>
  
  <p>2) There are any actions provided from swift like copy &amp; paste?</p>
  
  <pre><code>class TestManager: NSObject {
  
  // ....
      override init() {
          let editMenuItems = [
              NSMenuItem(title: "Cut", action: nil(/* Question 2) */), keyEquivalent: ""),
              NSMenuItem(title: "Copy", action: nil, keyEquivalent: ""),
              NSMenuItem(title: "Paste", action: nil, keyEquivalent: ""),
          ]
  
          for editMenuItem in editMenuItems {
              self.editMenu.addItem(editMenuItem)
          }
  
          // Qustion 1) .. show "Edit" Menu
      }
  }
  </code></pre>