Name
NSComboBoxCellDataSource — Mac OS X 10.0
Synopsis
NSComboBox
controls rely on data source objects to
provide the contents of the combo box. This informal protocol
provides the interface for NSComboBoxCell
data
source objects to implement. It declares methods that not only
provide the contents of the combo box list, but support
autocompletion behavior (where a string
is returned from the data source that matches a partially completed
string typed into the combo box field). At a minimum, data source
objects must implement the methods
comboBoxCell:objectValueForItemAtIndex
: and
numberOfItemsInComboBoxCell
:.
@interface NSObject (NSComboBoxCellDataSource)
|
// Instance Methods
|
- (int)numberOfItemsInComboBoxCell:(NSComboBoxCell *)comboBoxCell; |
- (id)comboBoxCell:(NSComboBoxCell *)aComboBoxCell objectValueForItemAtIndex:(int)index; |
- (unsigned int)comboBoxCell:(NSComboBoxCell *)aComboBoxCell indexOfItemWithStringValue:(NSString *)string; |
- (NSString *)comboBoxCell:(NSComboBoxCell *)aComboBoxCell completedString:(NSString *)uncompletedString; |
@end |
Get Cocoa in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.