Jan 15 2017
NSOutlineView Part 2: Making the outlineView useful
Xcode 8, macOS 10.12, Swift 3.0 In Part 1 of this tutorial, we created an outlineView that, thanks to a SourceListItem protocol, was indefinitely flexible: you can have different classes on several levels, or indefinite levels (though it is probably wise to limit this programatically so you don’t nest too deep. It all depends on […]
Jan 31 2017
selectionDidChange
I’ve just discovered an unwelcome difference between func tableViewSelectionDidChange(_ notification: Notification) and func outlineViewSelectionDidChange(_ notification: Notification) (NSOutlineView inherits from NSTableView, and the protocols share a lot of similarities). When there is no valid selection in an NSOutlineView, outlineviewSelectionDidChange fires, and outlineView.selectedRow is -1. When there is no valid selection in an NSTableView, tableViewSelectionDidChange does not […]
By Extelligent Cocoa • Bug Reports • • Tags: NSOutlineView, NSTableView