tags:

views:

34

answers:

1

I am trying to create a Mac OS X Cocoa based application with data displayed in a tabular format, but the data needs be displayed vertically in one column per entity instead of the standard NSTableView one row per entity functionality.

Is there an appropriate Cocoa class for this? Essentially I'm looking for a "horizontal" table of NSControls, but I do not need headers, sorting, etc. I just need a view to bind my core data array of entities to that displays the data in various NSCells depending on the field. (i.e. instead of one column of checkboxes and another column of textfields, I need one row of checkboxes and another row of textfields, etc.)

Thanks!

A: 

There is no pre-baked Cocoa control that handles this exactly like a table, just in "vertical" mode.

You might try NSCollectionView set to one row and unlimited columns. Create your NSCollectionViewItem (as the "prototype" or template) in a vertical configuration and you should be good to go for the most basic needs and even throws in some pretty animation.

The problem is, it's only available starting at 10.5 and is a lot less useful unless you're targeting 10.6 as a minimum. Even then NSCollectionView/Item can quickly become too unwieldy if your needs go beyond the basics it provides. At that point, creating your own home-brewed equivalent that targets what you need might be easier.

Joshua Nozzi
Thanks for the NSCollectionView idea, I'll look into it, but I think I need to either redesign my interface, or make this a custom view. Should be pretty straight forward, I just wanted to make sure I wasn't custom coding something that the framework could already handle well.
jonahashley