Instance Method

comboBoxCell:indexOfItemWithStringValue:

Invoked by an NSComboBoxCell object to synchronize the pop-up list’s selected item with the text field’s contents.

Declaration

- (NSUInteger)comboBoxCell:(NSComboBoxCell *)comboBoxCell indexOfItemWithStringValue:(NSString *)string;

Parameters

aComboBoxCell

The combo box cell.

aString

The string to match. If comboBoxCell:completedString: is implemented, aString is the string returned by that method. Otherwise, aString is 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.