Allow nil data source in -setDataSource:.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14982 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2002-11-12 19:41:26 +00:00
parent b686f93a32
commit 6a2f9200b9
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2002-11-12 20:40 Alexander Malmberg <alexander@malmberg.org>
* Source/NSTableView (-setDataSource:): Allow nil data source.
2002-11-10 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSSimpleLayoutManager.m

View file

@ -3109,14 +3109,14 @@ _isCellEditable (id delegate, NSArray *tableColumns,
const SEL sel_a = @selector (numberOfRowsInTableView:);
const SEL sel_b = @selector (tableView:objectValueForTableColumn:row:);
const SEL sel_c = @selector(tableView:setObjectValue:forTableColumn:row:);
if ([anObject respondsToSelector: sel_a] == NO)
if (anObject && [anObject respondsToSelector: sel_a] == NO)
{
[NSException
raise: NSInternalInconsistencyException
format: @"Data Source doesn't respond to numberOfRowsInTableView:"];
}
if ([anObject respondsToSelector: sel_b] == NO)
if (anObject && [anObject respondsToSelector: sel_b] == NO)
{
[NSException raise: NSInternalInconsistencyException
format: @"Data Source doesn't respond to "