From 115d29b6f822b558ff02235a2bf6f7bdfd11bfa6 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 19 Dec 2010 22:54:29 +0100 Subject: [PATCH] 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. --- AppKit/CPTableView.j | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index eb7fc5675..85849c6a4 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -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; }