Deal with nil in substrign expansion.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19898 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2004-08-21 10:06:24 +00:00
parent 695f87e485
commit 7ec8e6e7eb
2 changed files with 17 additions and 3 deletions

View file

@ -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
{