The problem here is that the NSComboBox selectionDidChange
notification is not well documented and its actual meaning is easily misunderstood.
The notification does not mean that the field value has changed, or even that it will change, it merely means that a menu item was selected. In particular, when using keyboard navigation, the notification is triggered when using the up/down arrow keys to move through the menu but the text in the field won't actually change unless you press enter (which does not trigger a notification).
This means that attempting to use this notification by getting the object value of the selected item (as shown by @Adion) can actually result in unexpected behaviour as it doesn't necessarily reflect the field value. Using a delay to get the field value instead (as shown by @SayeedHussain) can avoid this but it won't pick up the change if applied with the enter key.
Unfortunately I haven't yet found a nice way of properly detecting changes to the combo box - as far as I know the only solution is bindings/KVO.
One possibility is forcing the menu item to be applied as soon as it's selected (comboBox.objectValue = comboBox.objectValueOfSelectedItem
), but that's a change of standard UI behaviour and may not be desirable.