diff --git a/ChangeLog b/ChangeLog index eba01002c..d788bcd73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-08-21 Fred Kiefer + + * Source/NSComboBoxCell.m (-completedString:): Handle a nil + substring by returning nil directly without trying to find a + match. Patch by Andreas Hoeschler . + Changed data source error messages to consistent wording. + 2004-08-13 Quentin Mathe * Source/NSComboBoxCell.m: diff --git a/Source/NSComboBoxCell.m b/Source/NSComboBoxCell.m index 3ba9d4e89..ce4809538 100644 --- a/Source/NSComboBoxCell.m +++ b/Source/NSComboBoxCell.m @@ -980,7 +980,7 @@ numberOfRowsInColumn: (int)column { if (!_dataSource) { - NSLog(@"%@: A DataSource should be specified", self); + NSLog(@"%@: No data source currently specified", self); } else { @@ -1287,10 +1287,17 @@ numberOfRowsInColumn: (int)column */ - (NSString *)completedString:(NSString *)substring { + if (nil == substring) + { + return nil; + } + if (_usesDataSource) { if (!_dataSource) - NSLog(@"%@: A data source should be specified", self); + { + NSLog(@"%@: No data source currently specified", self); + } else if ([_dataSource respondsToSelector: @selector(comboBox:completedString:)]) { return [_dataSource comboBox: (NSComboBox *)[self controlView] @@ -1837,7 +1844,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect) { if (!_dataSource) { - NSLog(@"%@: A DataSource should be specified", self); + NSLog(@"%@: No data source currently specified", self); } else {