Revision: 397 http://trac.macosforge.org/projects/ruby/changeset/397 Author: rich@infoether.com Date: 2008-08-02 21:45:37 -0700 (Sat, 02 Aug 2008) Log Message: ----------- add ability to create a view Modified Paths: -------------- MacRuby/trunk/lib/hotcocoa/mappings/view.rb Modified: MacRuby/trunk/lib/hotcocoa/mappings/view.rb =================================================================== --- MacRuby/trunk/lib/hotcocoa/mappings/view.rb 2008-08-03 04:45:08 UTC (rev 396) +++ MacRuby/trunk/lib/hotcocoa/mappings/view.rb 2008-08-03 04:45:37 UTC (rev 397) @@ -1,6 +1,9 @@ HotCocoa::Mappings.map :view => :NSView do + defaults :frame => DefaultEmptyRect, + :layout => {} + constant :auto_resize, { :none => NSViewNotSizable, :width => NSViewWidthSizable, @@ -10,13 +13,17 @@ :max_x => NSViewMaxXMargin, :max_y => NSViewMaxYMargin } - + constant :border, { :none => NSNoBorder, :line => NSLineBorder, :bezel => NSBezelBorder, :groove => NSGrooveBorder } + + def init_with_options(view, options) + view.initWithFrame options.delete(:frame) + end custom_methods do
participants (1)
-
source_changes@macosforge.org