diff options
Diffstat (limited to 'ext/tk/sample/binding_sample.rb')
-rw-r--r-- | ext/tk/sample/binding_sample.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/sample/binding_sample.rb b/ext/tk/sample/binding_sample.rb index 693cc7de2f..3c2eb5e1cb 100644 --- a/ext/tk/sample/binding_sample.rb +++ b/ext/tk/sample/binding_sample.rb @@ -43,7 +43,7 @@ class Button_clone < TkLabel def invoke if @command - @command.call + @command.call else '' end @@ -53,7 +53,7 @@ end TkLabel.new(:text=><<EOT).pack This is a sample of 'event binding'. The first button is a normal button widget. -And the second one is a normal label widget +And the second one is a normal label widget but with some bindings like a button widget. EOT @@ -66,7 +66,7 @@ TkFrame.new{|f| TkLabel.new(f, :textvariable=>v).pack(:side=>:left) }.pack -TkButton.new(:text=>'normal Button widget', +TkButton.new(:text=>'normal Button widget', :command=>proc{ puts 'button is clicked!!' lbl.text 'button is clicked!!' @@ -75,7 +75,7 @@ TkButton.new(:text=>'normal Button widget', pack(:fill=>:x, :expand=>true) } -Button_clone.new(:text=>'Label with Button binding', +Button_clone.new(:text=>'Label with Button binding', :command=>proc{ puts 'label is clicked!!' lbl.text 'label is clicked!!' |