dataSource
The object that provides the data displayed by the table view.
Declaration
weak var dataSource: (any NSTableViewDataSource)? { get set }Discussion
The data source for the table view must implement the appropriate methods of the NSTableViewDataSource protocol. See Populating a Table View Programmatically and the NSTableViewDataSource protocol specification for more information. Note that in versions of macOS prior to v10.12, the table view did not retain the data source in a managed memory environment.
Setting the data source invokes tile().
If the delegate doesn’t respond to either numberOfRows(in:) or tableView(_:objectValueFor:row:), internalInconsistencyException may be raised.