DAArrayDataSourceDelegate

Overview

The DAArrayDataSourceDelegate Protocol describes the delegate methods that DAArrayDataSource will call on its delegate object for applying advanced features, like row coloring or handling double clicks on the row.

Location

Optional Methods


tableView:didReceiveDoubleClickOnColummn:row:

Informs the delegate that a double click was performed on the given column at the given row. This method can be useful if you want to hook that event and show your custom editor sheet for editing a row or cell that was clicked.

@optional - (void) tableView:(NSTableView *)tableView didReceiveDoubleClickOnColummn:(NSTableColumn *)column row:(NSInteger)rowIndex

Parameters:

  • tableView: Represents the instance of the NSTableView where that event happened.
  • column: Represents table column that has been clicked.
  • rowIndex: Represents the index of the row that has been clicked.

tableView:needsTextColor:backgroundColor:forRow:

method that informs delegate that it needs certain text color and background color for given row

@optional - (void) tableView:(NSTableView *)tableView needsTextColor:(NSColor **)text backgroundColor:(NSColor **)back forRow:(NSInteger)rowIndex

Parameters:

  • tableView: Represents the instance of the NSTableView where that event happened.
  • text: reference to the particular NSColor which will be used for painting the text in the cell.
  • back: reference to the particular NSColor which will be used for painting the background for given row.
  • rowIndex: Index of the row we are drawing at the moment

tableView:needsTextColor:backgroundColor:forTableColumn:row:

method that informs delegate that it needs certain text color and background color for given column and row

@optional - (void) tableView:(NSTableView *)tableView needsTextColor:(NSColor **)text backgroundColor:(NSColor **)back forTableColumn:(NSTableColumn *)TC row:(NSInteger)rowIndex

Parameters:

  • tableView: Represents the instance of the NSTableView where that event happened.
  • text: reference to the particular NSColor which will be used for painting the text in the cell.
  • back: reference to the particular NSColor which will be used for painting the background for given row.
  • TC: Instance of the NSTableColumn for which we configure text color and background color
  • rowIndex: Index of the row we are drawing at the moment

tableView:needsValue:forTableColumn:row:

method that informs the delegate that it needs cell value for given column and row

@optional - (void) tableView:(NSTableView *)tableView needsValue:(id *)value forTableColumn:(NSTableColumn *)TC row:(NSInteger)rowIndex

Parameters:

  • tableView: Represents the instance of the NSTableView where that event happened.
  • value: Cell value for given column and row
  • TC: Instance of the NSTableColumn for which we configure text color and background color
  • rowIndex: Index of the row we are handling at the moment

tableViewDidReceiveDoubleClick:

Informs the delegate that a double click was performed somewhere at the given NSTableView. This method can be useful if you want to hook that event and show some custom sheet with additional information

@optional - (void) tableViewDidReceiveDoubleClick:(NSTableView *)tableView

Parameters:

  • tableView: Represents the instance of the NSTableView where that event happened.

tableViewSelectionDidChange:

Informs the delegate that rows selection was changed in the given NSTableView.

@optional - (void) tableViewSelectionDidChange:(NSTableView *)tableView

Parameters:

  • tableView: Represents the instance of the NSTableView where that event happened.

tableViewSortingDidChange:

Informs the delegate that sorting mode was changed in the given NSTableView.

@optional - (void) tableViewSortingDidChange:(NSTableView *)tableView

Parameters:

  • tableView: Represents the instance of the NSTableView where that event happened.

See Also

  • DAArrayDataSource In Depth