Fixed: if a custom CPTableView header view was used for a column, such as a CPImageView, sorting by that column would cause an exception as CPTableView tried to send _setIndicatorImage: to the view. The fix is to only send the message if the view supports it.

This commit is contained in:
Alexander Ljungberg
2010-07-28 13:57:49 -07:00
committed by Ross Boucher
parent 6ff3fa0e52
commit 05e435633f
+5 -1
View File
@@ -1920,7 +1920,11 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
- (void)setIndicatorImage:(CPImage)anImage inTableColumn:(CPTableColumn)aTableColumn
{
if (aTableColumn)
[[aTableColumn headerView] _setIndicatorImage:anImage];
{
var headerView = [aTableColumn headerView];
if ([headerView respondsToSelector:@selector(_setIndicatorImage:)])
[headerView _setIndicatorImage:anImage];
}
}
- (CPImage)_tableHeaderSortImage