danielpi / NSOutlineViewInSwift

A project to help me understand what is required to provide data for an NSOutlineView or Source List control
MIT License
59 stars 5 forks source link

NSOutlineViewInSwift

A project to help me understand what is required to provide data for an NSOutlineView control

First up I'll try to get the File system example from the Outline View Programming Guide.

NSOutlineViewInSwift Project

Option Setting
Table Type NSOutlineView
Content View Cell Based
Language Swift
IB Method Storyboard
Example from Outline View Programming Topics

Steps followed to create the demo (Using Mac OS X Yosemite 10.10.1 and XCode 6)

Now the application should run and show you the file system in the outline view.

NSOutlineViewUsingViewMode Project

Option Setting
Table Type NSOutlineView
Content View View Based
Language Swift
IB Method Storyboard
Example from Outline View Programming Topics

There is a version of the same program which uses a view based outline view instead of a cell based view. It should operate exactly the same despite this difference. What needed to be changed between the two programs is listed below

The application should then run the same as the Cell based version.

NSSourceListInSwift Project

Option Setting
Table Type Source List (NSOutlineView)
Content View View Based
Language Swift
IB Method Storyboard
Example from Me

Source list views are a little different from regular NSOutlineViews because they are often used to display groups of quite different objects. For instance in the Finder we have Favourites (Finder folders), Devices, Shared and Tags are all shown in the one Source List. For this reason I feel we should be able to map very different model objects into a source list without making everything come from the same base ItemClass. This has proven to be quite difficult for me to master.

Some of the issues and points of interest are