Skip to content

Instantly share code, notes, and snippets.

@BlairDuncan
Created June 19, 2010 12:09
Show Gist options
  • Save BlairDuncan/444845 to your computer and use it in GitHub Desktop.
Save BlairDuncan/444845 to your computer and use it in GitHub Desktop.
- (CGRect)frameOfOutlineDataViewAtRow:(CPInteger)aRow
{
// the cocoa docs says it returns a zeroRect if not expandable which makes no sence
// if(! [self isExpandable:[self itemAtRow:aRow]]) return CGRectMakeZero();
var aColumn = [[self tableColumns] indexOfObjectIdenticalTo:[self outlineTableColumn]]
frame = [super frameOfDataViewAtColumn:aColumn row:aRow],
indentationWidth = ([self levelForRow:aRow] + 1) * [self indentationPerLevel];
frame.origin.x += indentationWidth;
frame.size.width -= indentationWidth;
return frame;
}
- (CGRect)frameOfOutlineDataViewAtColumn:(CPInteger)aColumn row:(CPInteger)aRow
{
CPLog.warn("[" + _cmd + "] is deprecated, using [frameOfOutlineDataViewAtRow:] instead.");
return [self frameOfOutlineDataViewAtRow:aRow];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment