• 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: Best way to put two NSCells in one?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to put two NSCells in one?


  • Subject: Re: Best way to put two NSCells in one?
  • From: j o a r <email@hidden>
  • Date: Sun, 5 Dec 2004 20:47:06 +0100

One way to do this is to return the text string, and then set the image in the "willDisplayCell:" delegate method. Or the other way around.

A slightly more involved method would be to subclass NSButtonCell and override setObjectValue. In your implementation of the setObjectValue method you could accept a dictionary with an image and a string, and set both at once. At least I think that you could do something like that.

j o a r

On 2004-12-05, at 20.33, Gwynne wrote:

Ok, then what do I return from -tableView:objectValueForTableColumn:row: in my data source? (I'm not using bindings; the retains NSArrayController put on my objects during selection were causing all sorts of troubles for me). Both the image and text need to change dynamically.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Best way to put two NSCells in one? (From: Gwynne <email@hidden>)
 >Re: Best way to put two NSCells in one? (From: j o a r <email@hidden>)
 >Re: Best way to put two NSCells in one? (From: Gwynne <email@hidden>)

  • Prev by Date: NSDocument subclass not dealloced after promising data - best way out this?
  • Next by Date: Re: Absolute Value |x - y|
  • Previous by thread: Re: Best way to put two NSCells in one?
  • Next by thread: Re: Best way to put two NSCells in one?
  • Index(es):
    • Date
    • Thread