Contents

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. For more information, see the NSTableViewDataSource protocol specification. 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.

See Also

Managing the Table’s Data