Re: NSTableView Sends Null Column to Delegate/DataSource
Re: NSTableView Sends Null Column to Delegate/DataSource
- Subject: Re: NSTableView Sends Null Column to Delegate/DataSource
- From: Quincey Morris <email@hidden>
- Date: Sat, 14 Jul 2012 12:38:39 -0700
On Jul 14, 2012, at 10:08 , Keary Suska wrote:
> For the archives, it is not safe to assume that tableView:isGroupRow: will determine which rows are actually group rows, at least if you implement tableView:dataCellForTableColumn:row:. It seems that regardless of whether you implement tableView:isGroupRow:, NSTableView will always send tableView:dataCellForTableColumn:row: a nil tablecolumn argument to determine whether the row is a group row (ostensibly). If you return an NSCell object, it will assume that the row is a group row and as a consequence will assume that *every* row is a group row unless the row returns nil.
A group row is one drawn with with different style characteristics. (In a normal table, for example, it has a gradient shaded background.) This is controlled by 'tableView:isGroupRow:'.
A group cell is one that draws the *entire row* as a single cell (and cells are not drawn per column). This is controlled by 'tableView:dataCellForTableColumn:nil row:'.
The two things are orthogonal, although in many cases you'll want the the group row to use a group cell to span the width of the table. One case where you might use a group cell *not* in a group row is in an outline view, where expandable rows might not need to show column information like detail rows.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden