 		tableView.reloadData()
 	}
 }
+
+// MARK: - Bond implementation
 
 public extension SignalProtocol where Element: DataSourceEventProtocol, Element.DataSource: QueryableDataSourceProtocol, Element.DataSource.Item: Any, Element.DataSource.Index == Int, Error == NoError {
 

	}
	
	public func apply(event: DataSourceEvent<DataSource>, to tableView: NSTableView) {
		switch event.kind {
		case .reload:
			tableView.reloadData()

  }
}

// MARK: - Table view integration

extension NSTableView {
	
	fileprivate var updating: Bool {
		get {
			return objc_getAssociatedObject(self, &NSTableViewUpdatingKey) as? Bool ?? false
		}
		set {
			objc_setAssociatedObject(self, &NSTableViewUpdatingKey, newValue, .OBJC_ASSOCIATION_RETAIN)
		}
	}
}

private var NSTableViewUpdatingKey: UInt8 = 0

// MARK: - Bond declaration

public protocol TableViewBondOptionable {
	var insertAnimation: NSTableViewAnimationOptions? { get }
	var deleteAnimation: NSTableViewAnimationOptions? { get }
}

public protocol TableViewBond: TableViewBondOptionable {
	
	associatedtype DataSource: DataSourceProtocol
	
	func apply(event: DataSourceEvent<DataSource>, to tableView: NSTableView)
	func heightForRow(at index: Int, tableView: NSTableView, dataSource: DataSource) -> CGFloat?
