Need Combobox example for receiving selection changed notification

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

Replies

Just in case someone else has this question I wrote up a working example:

Code Block //
//
//  ViewController.swift
//  comboboxExample
//
//  Created by Clark Williams on 20-08-21.
//  Copyright © 2020 Software Industry & General Hardware. All rights reserved.
//
import Cocoa
class ViewController: NSViewController, NSComboBoxDelegate {
    @IBOutlet weak var comboboxOutlet: NSComboBox!
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        comboboxOutlet.delegate = self
    }
    override var representedObject: Any? {
        didSet {
        // Update the view, if already loaded.
        }
    }
    func comboBoxSelectionDidChange(_ notification: Notification) {
        print ( "Combobox value changed." )
    }
}

The problem I had was the signature was not correct on the func "comboBoxSelectionDidChange(_ notification: Notification)". Simple unless you're too tired to see it.