acc. Cocoa Docs., NSComboBoxCell objectValueOfSelectedItem should log a message if it is called when usesDataSource is set to YES

This commit is contained in:
Dr. Rolf Jansen 2008-07-08 13:11:15 +00:00
parent 550372950a
commit 6021275b90

View File

@ -173,7 +173,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
}
-objectValueOfSelectedItem {
return [self objectValue];
if (!_usesDataSource)
return [self objectValue];
else
{
NSLog(@"*** -[%@ %s] should not be called when usesDataSource is set to YES",isa,SELNAME(_cmd));
return NULL;
}
}
-(void)selectItemAtIndex:(int)index {