An easier algorithm to do this on Leopard:
- (CGFloat)mySizeToFitWidthOfColumn:(NSInteger)column row:
(NSInteger)row {
NSCell *cell = [self preparedCellAtColumn:column row:row];
return [cell cellSize].width + 1;
}
..
// for each table column:
for (NSInteger i = 0; i [self
sizeToFit simply sets the width of a column to the width of the
header cell - and I suspect that you
want to set the width of each column to suit the widest cell of
data in that column.
Here is the heuristic to achieve that:
( Assuming that you have not changed the font for any of the