selectItem(withObjectValue:)
Selects the first pop-up list item that corresponds to the given object.
Declaration
func selectItem(withObjectValue object: Any?)Parameters
- object:
The object to select in the pop-up list. Objects are considered equal if they have the same id or if
isEqual:returns True.
Discussion
This method logs a warning if usesDataSource returns true. Posts an selectionDidChangeNotification to the default notification center if the selection does in fact change. Note that this method doesn’t alter the contents of the combo box’s text field—see Setting the Combo Box’s Value for more information.