mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:20:37 +00:00
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:
parent
695f87e485
commit
7ec8e6e7eb
2 changed files with 17 additions and 3 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue