• 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
NSArrayController & image in column
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArrayController & image in column


  • Subject: NSArrayController & image in column
  • From: Todd Heberlein <email@hidden>
  • Date: Tue, 19 Apr 2011 14:26:23 -0700

I want to have an NSTableView controlled by an NSArrayController using an NSArray data source. In one of the columns I want to display one of several images. The choice of image will be based on an integer value in one of the fields of the array.

What is the best or most recommended way to do this?


Should I add to my NSArray object a field for an NSImage field (with getter/setter) and automatically load the image into the NSArray object, and then use that the getter for the NSImage as the key in the NSArrayController?

Should I subclass NSTableColumn and override
	-dataCellForRow:?

Should I use a delegate for the NSTableView and override
	-tableView:dataCellForTableColumn:row:?

Can I even use a custom NSTableColumn or NSTableView delegate with a table controlled by an NSArrayController?

Thanks,

Todd

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSArrayController & image in column
      • From: Quincey Morris <email@hidden>
    • Re: NSArrayController & image in column
      • From: Dave DeLong <email@hidden>
  • Prev by Date: Re: How call upper layer function
  • Next by Date: Re: NSArrayController & image in column
  • Previous by thread: Re: How call upper layer function
  • Next by thread: Re: NSArrayController & image in column
  • Index(es):
    • Date
    • Thread