• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Images & Alternate Color Rows In Table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Images & Alternate Color Rows In Table
      • From: Ryan Stevens <email@hidden>
References: 
 >Images & Alternate Color Rows In Table (From: email@hidden)

  • Prev by Date: Re: Non-character as button key equivalent
  • Next by Date: Re: NSTask problems.
  • Previous by thread: Images & Alternate Color Rows In Table
  • Next by thread: Re: Images & Alternate Color Rows In Table
  • Index(es):
    • Date
    • Thread