comboBoxCell(_:indexOfItemWithStringValue:)
Invoked by an NSComboBoxCell object to synchronize the pop-up list’s selected item with the text field’s contents.
Declaration
optional func comboBoxCell(_ comboBoxCell: NSComboBoxCell, indexOfItemWithStringValue string: String) -> IntParameters
- comboBoxCell:
The combo box cell.
- string:
The string to match. If Comboboxcell(_:completedstring:) is implemented,
aStringis the string returned by that method. Otherwise,aStringis the text that the user has typed.
Return Value
The index for the pop-up list item matching aString, or NSNotFound if no item matches.
Discussion
If you don’t implement this method, the receiver does not synchronize the pop-up list’s selected item with the text field’s contents.