I have a swift file that will use a NSCombobox with the viewController defined as:
class ViewController: NSViewController, NSComboBoxDelegate {...}
In the swift file I have a Combobox defined as:
@IBOutlet weak var monthHalfComboOutlet : NSComboBox!
I set the delegate in he viewDidLoad method:
monthHalfComboOutlet.delegate = self
When the user makes a section change from the Combobox I want to receive a notification. I've written this in Objective-C multiple times and it works fine. But I can't seem to figure out what swift is looking for. Ideally I would have the function below called on the notification:
@objc func onComboBoxChanged ( object: Notification.Name )
{
showCometName ( allowDisplay: validCometNameEntered() )
print ( "madeit" )
}
Would someone please point me to an example of using a notification using macOS and a Combobox? I would really appreciate it.
TIA
ClarkW
class ViewController: NSViewController, NSComboBoxDelegate {...}
In the swift file I have a Combobox defined as:
@IBOutlet weak var monthHalfComboOutlet : NSComboBox!
I set the delegate in he viewDidLoad method:
monthHalfComboOutlet.delegate = self
When the user makes a section change from the Combobox I want to receive a notification. I've written this in Objective-C multiple times and it works fine. But I can't seem to figure out what swift is looking for. Ideally I would have the function below called on the notification:
@objc func onComboBoxChanged ( object: Notification.Name )
{
showCometName ( allowDisplay: validCometNameEntered() )
print ( "madeit" )
}
Would someone please point me to an example of using a notification using macOS and a Combobox? I would really appreciate it.
TIA
ClarkW