On Jun 15, 2013, at 19:31 , Rick Mann <rm...@latencyzero.com> wrote:

> There's a setting for "Automatic"…where does it get it from then?

AFAIK, it means the row height is set automatically based on the control size 
(small/medium/large).

> Also, is there no way, using bindings, and no delegate, to choose among 
> multiple NSTableViewCell implementations? I thought the 2011 WWDC video said 
> it was possible, but I didn't quite understand what it was referring to. 
> Unfortunately, there's no straightforward pure-bindings example to look at.

There's no way within the design-time table view itself. If the table uses 
bindings and there's no delegate, the column identifier is used to choose the 
cell view to instantiate, which can be the design-time cell view or a view in 
its own registered nib, but can't be varied by row.

If you want to choose between cell views by row, you need to put each cell view 
in its own nib, register each nib with the table view under a unique 
identifier, then implement the 'tableView/outlineView:viewFor…' delegate method 
to decide which identifier to use. It's very easy to do -- all it needs is to 
invoke 'makeViewWithIdentifier…' with a suitable identifier.

BTW, it can be much harder to vary the row height based on the cell view. You'd 
either need to cache all possible cell view heights in advance, or have a 
mechanism to calculate the cell view heights before view instantiation, or some 
combination of the two approaches.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to