Fixed: if data source was nil, the table view needlessly warned about no content binding in numberOfRowsInTableView.

A table with a nil data source and no content binding is simply an empty table, or more likely, a table not fully configured yet.
This commit is contained in:
Alexander Ljungberg
2010-12-19 22:54:29 +01:00
parent 05ef7c83a8
commit 115d29b6f8
+2 -1
View File
@@ -1152,7 +1152,8 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
_numberOfRows = [_dataSource numberOfRowsInTableView:self];
else
{
CPLog(@"no content binding established and data source " + [_dataSource description] + " does not implement numberOfRowsInTableView:");
if (_dataSource)
CPLog(@"no content binding established and data source " + [_dataSource description] + " does not implement numberOfRowsInTableView:");
_numberOfRows = 0;
}