removeTableColumn: on the outlineview shouldn't allow removal of outlineTableColumn per cocoa.

This commit is contained in:
Randall Luecke committed 2011-01-15 18:31:41 -05:00
1 parent ddbba22533
commit e656e0561b
1 file changed
+11
+11
View File
@@ -958,6 +958,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
Adds a new table column to the reciever. If this is the first column added it will automatically be set to the outline column.
Also see -setOutlineTableColumn:
NOTE: This behavior deviates from cocoa slightly.
@param CPTableColumn aTableColumn - The table column to add.
*/
- (void)addTableColumn:(CPTableColumn)aTableColumn
{
@@ -966,6 +967,16 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
if ([self numberOfColumns] === 1)
_outlineTableColumn = aTableColumn;
}
/*!
@ignore
*/
- (void)removeTableColumn:(CPTableColumn)aTableColumn
{
if (aTableColumn === [self outlineTableColumn])
CPLog("CPOutlineView cannot remove outlineTableColumn with removeTableColumn:. User setOutlineTableColumn: instead.");
else
[super removeTableColumn:aTableColumn];
}
/*!
@ignore
We overide this because we need a special behaviour for the outline column