How to implement a custom list in Cocoa?

I want to create a Cocoa application with a list of entries very similar to the ToDo Things.app list ( see screencast ). The question is whether to use

  • Tableview
  • CollectionView or
  • WebView

I think it can work with all of them, but which one is better suited for the following requirements?

  • there is a list of entries -> 1 column and many rows
  • drag and drop reordering
  • select individual entries and use keys for actions like delete
  • open entry: the line must expand to display more input fields.
  • individual look: rounded corners, shadow, background gradient

Until now, my research has said that TableView has most of the functionality, but it’s more difficult to customize its appearance, CollectionView does not have drag and drop (right?), But it’s easy to design, and WebView will take a lot to not damage the user interface, and I can’t Bind your model directly to input fields.

What are the pros and cons to me and what do you recommend to use?

+5
source share
5 answers

WebView doesn't make sense. You can also create a web application if you use WebView. NSCollectionView is more suitable for grid data such as TV listings per hour.

NSTableView - , . 5 NSTableView . NSTableView . .

+4
  • : , .

. .

, NSOutlineView NSTableView, .

+2

, . Matteo Bertozzi : http://th30z.netsons.org/2009/03/cocoa-sidebar-with-badges-take-2/ , ( ), , , .

: cocoa -dev email. .

+2

Things.app, "F- script ".

NSTableView "DetailTableView", todo. todo "ToDoCell", , , . "ToDoEditView", DetailTableView, . , , , .

. , . .

+1
source

I approach the same problem in my application (with one big list, similar to the Things todo list), and I think that presenting the table will make a lot of sense here.

The trick is to double-click your cells ("rows"). This is about everything that I have done so far.

0
source

All Articles