diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-30 07:15:00 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-30 07:15:00 +0000 |
| commit | 14529fe9a07b7fd57f3f1e00d3547c93f9b6aee9 (patch) | |
| tree | d933554bf3086ff89f359a5489a7b5aea61b304f /ext/tk/sample/tktimer2.rb | |
| parent | 92ecbce72f93136625c41170d927c0896a7f01dc (diff) | |
| download | ruby-14529fe9a07b7fd57f3f1e00d3547c93f9b6aee9.tar.gz ruby-14529fe9a07b7fd57f3f1e00d3547c93f9b6aee9.tar.xz ruby-14529fe9a07b7fd57f3f1e00d3547c93f9b6aee9.zip | |
* bug fix
* fix lack of methods for TkEntry
* fix reference of uninitialized variables
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tktimer2.rb')
| -rw-r--r-- | ext/tk/sample/tktimer2.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/tk/sample/tktimer2.rb b/ext/tk/sample/tktimer2.rb index dc4e8a696..dd31bb098 100644 --- a/ext/tk/sample/tktimer2.rb +++ b/ext/tk/sample/tktimer2.rb @@ -32,6 +32,10 @@ TkButton.new(:text=>'Start') { command proc{ timer.continue unless timer.running? } pack(:side=>:left, :fill=>:both, :expand=>true) } +TkButton.new(:text=>'Restart') { + command proc{ timer.restart(0, proc{ label.text('0.00'); 0 }) } + pack(:side=>:left, :fill=>:both, :expand=>true) +} TkButton.new(:text=>'Stop') { command proc{ timer.stop if timer.running? } pack('side'=>'right','fill'=>'both','expand'=>'yes') |
