I'm currently working on a menubar app and I'm trying to implement a NSTextField or NSSecureTextField.
This is what I do to add NSMenuItems
let menu = NSMenu()
menu.addItem(NSMenuItem(title: "Save Test Data", action: #selector(AppDelegate.saveData), keyEquivalent: ""))
Cannot convert value of type '(NSTextField).Type'(aka 'NSTextField.Type') to expected argument type 'NSMenuItem'
You cannot add other elements as
NSMenuItem to a menu directly.
To implement a text field you have wrap it in a custom
NSView and assign the view to the
view property of the menu item.