Got two unexpected results from running this script in HotConsole:

require 'hotcocoa'
include HotCocoa

w = window(:title => "Window", :size => [220,100])

$lv = layout_view :frame => [0,0,200,80], :layout => {:expand => [:width, :height], :align => :center, :start => true} do |view| view << $l = label(:text_align => :center, :text => "", :layout => {:expand => [:width, :height], :align => "center"}) view << $btn = button(:title => "Put some text in the label", :layout => {:align => "center"})
end

w << $lv

$btn.on_action($l.text = "some text")

Expected: Nothing
Got: NoMethodError: undefined method `on_action' for 0:NSButton
hotconsole:13:in `<compiled>'

Expected: Text label to be empty
Got: "some text"

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to