[macruby-changes] [1598] MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb
source_changes at macosforge.org
source_changes at macosforge.org
Tue May 26 11:48:09 PDT 2009
Revision: 1598
http://trac.macosforge.org/projects/ruby/changeset/1598
Author: rich at infoether.com
Date: 2009-05-26 11:48:09 -0700 (Tue, 26 May 2009)
Log Message:
-----------
add data_source, reload and grid_style constant map/methods TICKET # 260
Modified Paths:
--------------
MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb
Modified: MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb 2009-05-26 18:44:53 UTC (rev 1597)
+++ MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb 2009-05-26 18:48:09 UTC (rev 1598)
@@ -10,6 +10,13 @@
:last_column_only => NSTableViewLastColumnOnlyAutoresizingStyle,
:first_column_only => NSTableViewFirstColumnOnlyAutoresizingStyle
}
+
+ constant :grid_style, {
+ :none => NSTableViewGridNone,
+ :vertical => NSTableViewSolidVerticalGridLineMask,
+ :horizontal => NSTableViewSolidHorizontalGridLineMask,
+ :both => NSTableViewSolidVerticalGridLineMask | NSTableViewSolidHorizontalGridLineMask
+ }
def init_with_options(table_view, options)
table_view.initWithFrame(options.delete(:frame))
@@ -22,6 +29,10 @@
setDataSource(data_source)
end
+ def data_source
+ dataSource
+ end
+
def columns=(columns)
columns.each do |column|
addTableColumn(column)
@@ -39,6 +50,18 @@
def column_resize=(style)
setColumnAutoresizingStyle(style)
end
+
+ def reload
+ reloadData
+ end
+
+ def alternating_row_background_colors=(value)
+ setUsesAlternatingRowBackgroundColors(value)
+ end
+
+ def grid_style=(value)
+ setGridStyleMask(value)
+ end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090526/61098e18/attachment.html>
More information about the macruby-changes
mailing list