On Dec 18, 2008, at 3:59 PM, Graham Cox wrote:


On 19 Dec 2008, at 10:50 am, Corbin Dunn wrote:


On Dec 18, 2008, at 3:28 PM, Graham Cox wrote:

The five kinds of representedObject are a) a custom class of my own, b) a NSColor, c) a NSString, d) a NSValue and d) an NSImage. Corresponding to these I set the dataCell to a,d) NSImageCell, b) a custom cell type to handle colours, c,d) a NSTextFieldCell.

A regular NSTextFieldCell, or a custom subclass? If so, what code is in in it?

corbin


Actually I'm using RSVerticallyCenteredTextFieldCell from Daniel Jalkut. But I've tried substituting an ordinary NSTextFieldCell and I get the same outcome. Just to show, the code where I make the cell is:

Unfortunately, I don't know. Editing makes a copy of the cell, and sometimes people don't get the copying write, causing things to share data. It sounds like that isn't your issue.

I'd suggest overriding preparedCellAtColumn:row: and po'ing the resulting cell each time it is drawn.

Also, using -dataCellForColumn:row: is a better approach than changing the datacell on the tablecolumn.

corbin


_______________________________________________

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

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

Reply via email to