April 2015
Intermediate to advanced
556 pages
17h 47m
English
Setting up a data source for a table view follows the same pattern that you saw in Chapter 6 when setting up a delegate for the speech synthesizer. There are three steps: conforming to the protocol, implementing methods from the protocol, and setting the dataSource property.
In MainWindowController.swift, add the NSTableViewDataSource protocol to the MainWindowController class definition.
import Cocoaclass MainWindowController: NSWindowController, NSSpeechSynthesizerDelegate,NSWindowDelegate {class MainWindowController: NSWindowController, NSSpeechSynthesizerDelegate, NSWindowDelegate, NSTableViewDataSource { ...