Once the GUI for the NSTableView
has been connected to its delegate
and dataSource
object in Interface Builder, we need to implement the required methods to support those protocols.
There are two methods that the delegate
and dataSource
object need to implement in order for our table view to be populated. They are as follows:
numberOfRowsInTableView:
tableView objectValueForTableColumn:row:
There is also one other method, awakeFromNib:
that is called automatically when an object is created from the .xib
file. We will use this method to perform initialization that is required when the object is created.