For example, if we bind the NSPopupButton's selected index property:
A bigger issue happens when we have this scenario:
- User selects index 1 from the UI
- We programmatically call popupButton.selectItem(at: 2), the UI changed to show that index 2 is selected
- User reselects index 1 from the UI
- selectedIndex.didset is not called for the user action!!
This happens because when we change the selected item programmatically to 2, selectedIndex's value doesn't actually change, it stayed at 1. So when the user change the index back to 1 via the UI, Cocoa realized that the value of selectedIndex is still the same (1), so it decided not to call the didset function.