Sha256: 9b1c6afd18df946301af30e48df200b63f49359e3492af4f41909a18c48e7fba
Contents?: true
Size: 947 Bytes
Versions: 15
Compression:
Stored size: 947 Bytes
Contents
# @provides MotionKit::NSTableViewHelpers # @requires MotionKit::NSViewHelpers module MotionKit class NSTableViewHelpers < NSViewHelpers targets NSTableView def add_column(column_or_identifier, &block) if column_or_identifier.is_a?(NSTableColumn) column = column_or_identifier else column = NSTableColumn.alloc.initWithIdentifier(column_or_identifier) column.headerCell.stringValue = column_or_identifier end target.addTableColumn(column) context(column, &block) column end alias add_table_column add_column def column(column_or_identifier, &block) if column_or_identifier.is_a?(NSTableColumn) column = column_or_identifier else column_index = target.columnWithIdentifier(column_or_identifier) column = target.tableColumns[column_index] end context(column, &block) end alias table_column column end end
Version data entries
15 entries across 15 versions & 1 rubygems