Creating a Programatic NSMenu
Conceptually:
- The NSMenu class can hold NSMenuItems
- To add an item to an NSMenu you need to First add an NSMenuItem to the supermenu. And then set the submenu of this to NSMenu()
- You can set title and key trigger and also delegate an action to a method. A target value can be set to scope the delegation
Example:
//coming soon
To enable s + ctrl key combo:
keyEquivalentModifierMask = NSEventModifierFlags.ControlKeyMask.rawValue.int