Re: Images & Alternate Color Rows In Table
Re: Images & Alternate Color Rows In Table
- Subject: Re: Images & Alternate Color Rows In Table
- From: David Martin <email@hidden>
- Date: Thu, 25 Jul 2002 14:53:48 +0200
On Friday, July 19, 2002, at 11:44 , email@hidden wrote:
I'm trying to setup my NSTableView to alternate its row color. The code
I have written seems to work provided there are no columns with images
in. If there are images in the columns I get the following build error:
2002-07-19 20:46:01.097 SetTheTableView[328] *** -[NSImageCell
setDrawsBackground:]: selector not recognized
2002-07-19 20:46:01.105 SetTheTableView[328] An uncaught exception was
raised
2002-07-19 20:46:01.105 SetTheTableView[328] *** -[NSImageCell
setDrawsBackground:]: selector not recognized
2002-07-19 20:46:01.106 SetTheTableView[328] *** Uncaught exception:
<NSInvalidArgumentException> *** -[NSImageCell setDrawsBackground:]:
selector not recognized
The problem is that the only NSCell subclass understanding "background"
things is the NSTextFieldCell. If you have an NSImageCell, or an
NSButtonCell, you're in trouble.
I ran into the same problem yesterday and currently, the only workaround
I can think of is the one provided by
/Developer/Examples/AppKit/DragNDropOutlineView/: creating a subclass of
NSTextFieldCell capable of displaying images.
On the other hand, Mail.app is able to draw colored backgrounds in its
read or flagged columns when you write the appropriate rules.
If anyone has any idea
Bye,
David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.