- Package:
- com.apple.yellow.application
The NSComboBoxCellDataSource category declares the methods that an NSComboBoxCell uses to access the contents of its data source object. The combo box cell determines how many items to display by sending a numberOfItemsInComboBoxCell message, and accesses individual values with the comboBoxCellObjectValueForItemAtIndex method. Incremental searches-performed when a user types into the combo box's text field while the pop-up list is displayed-are performed by sending comboBoxCellIndexOfItem messages to the combo box cell's data source.
The NSComboBoxCell treats objects provided by its data source as values to be displayed in the combo box's pop-up list. If these objects aren't of common value classes-such as String, Number, and so on-you'll need to create a custom NSFormatter to display them. See the NSFormatter class specification for more information.
public abstract String comboBoxCellCompletedString(
NSComboBoxCell aComboBoxCell,
String uncompletedString)
public abstract int comboBoxCellIndexOfItem(
NSComboBoxCell aComboBoxCell,
String aString)
NotFound
if no item matches. This
method is optional; if you don't provide an implementation for
this method, no searches occur.public abstract Object comboBoxCellObjectValueForItemAtIndex(
NSComboBoxCell aComboBoxCell,
int index)
public abstract int numberOfItemsInComboBoxCell(NSComboBoxCell aComboBoxCell)