[macruby-changes] [659] MacRuby/trunk/lib/hotcocoa
source_changes at macosforge.org
source_changes at macosforge.org
Wed Oct 8 19:29:49 PDT 2008
Revision: 659
http://trac.macosforge.org/projects/ruby/changeset/659
Author: rich at infoether.com
Date: 2008-10-08 19:29:49 -0700 (Wed, 08 Oct 2008)
Log Message:
-----------
patches by ben at tanjero.com
Modified Paths:
--------------
MacRuby/trunk/lib/hotcocoa/layout_view.rb
MacRuby/trunk/lib/hotcocoa/mappings/column.rb
MacRuby/trunk/lib/hotcocoa/mappings/window.rb
Modified: MacRuby/trunk/lib/hotcocoa/layout_view.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/layout_view.rb 2008-10-09 01:24:08 UTC (rev 658)
+++ MacRuby/trunk/lib/hotcocoa/layout_view.rb 2008-10-09 02:29:49 UTC (rev 659)
@@ -26,7 +26,7 @@
# Whether the view is packed at the start or the end of the packing view.
# Default value is true.
#
- # :expand -> :vertical, :horizontal, [:vertical, :horizontal]
+ # :expand -> :height, :width, [:height, :width]
# Whether the view's first dimension (width for horizontal and height for vertical)
# should be expanded to the maximum possible size, and should be variable according
# to the packing view frame.
@@ -267,7 +267,11 @@
relayout!
end
end
-
+
+ def frame=(frame)
+ setFrame(frame)
+ end
+
def margin
@margin
end
Modified: MacRuby/trunk/lib/hotcocoa/mappings/column.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/mappings/column.rb 2008-10-09 01:24:08 UTC (rev 658)
+++ MacRuby/trunk/lib/hotcocoa/mappings/column.rb 2008-10-09 02:29:49 UTC (rev 659)
@@ -1,14 +1,20 @@
HotCocoa::Mappings.map :column => :NSTableColumn do
+ defaults :title => 'Column'
+
def init_with_options(column, options)
column.initWithIdentifier(options.delete(:id))
end
custom_methods do
- def text=(value)
- headerCell.setStringValue(value)
+ def title
+ headerCell.stringValue
end
+
+ def title=(newTitle)
+ headerCell.stringValue = newTitle
+ end
end
Modified: MacRuby/trunk/lib/hotcocoa/mappings/window.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/mappings/window.rb 2008-10-09 01:24:08 UTC (rev 658)
+++ MacRuby/trunk/lib/hotcocoa/mappings/window.rb 2008-10-09 02:29:49 UTC (rev 659)
@@ -96,7 +96,7 @@
delegating "windowDidDeminiaturize:", :to => :did_deminiturize
delegating "windowDidEndSheet:", :to => :did_end_sheet
delegating "windowDidExpose:", :to => :did_expose, :parameters => ["windowDidExpose.userInfo['NSExposedRect']"]
- delegating "windowDidMiniaturize:", :to => :did_miniturize
+ delegating "windowDidMiniaturize:", :to => :did_miniaturize
delegating "windowDidMove:", :to => :did_move
delegating "windowDidResignKey:", :to => :did_resign_key
delegating "windowDidResignMain:", :to => :did_resign_main
@@ -106,7 +106,7 @@
delegating "windowShouldZoom:toFrame:", :to => :should_zoom?, :parameters => [:toFrame]
delegating "windowWillBeginSheet:", :to => :will_begin_sheet
delegating "windowWillClose:", :to => :will_close
- delegating "windowWillMiniaturize:", :to => :will_miniturize
+ delegating "windowWillMiniaturize:", :to => :will_miniaturize
delegating "windowWillMove:", :to => :will_move
delegating "windowWillResize:toSize:", :to => :will_resize, :parameters => [:toSize]
delegating "windowWillReturnFieldEditor:toObject:", :to => :returning_field_editor, :parameters => [:toObject]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081008/c6f68589/attachment-0001.html
More information about the macruby-changes
mailing list