NSArrayController & image in column
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