NSComboBoxDataSource Mac OS X 10.0

This informal protocol provides methods for a class to implement to act as a data source for NSComboBox objects. This protocol 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 comboBox:objectValueForItemAtIndex: and numberOfItemsInComboBox:.

@interface NSObject (NSComboBoxDataSource)
 // Instance Methods
   - (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox;
   - (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index;
   - (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)string;
   - (NSString *)comboBox:(NSComboBox *)aComboBox completedString:(NSString *)string;

    Part II: API Quick Reference
    Chapter 13. Foundation Classes