diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-23 00:52:41 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-23 00:52:41 +0000 |
commit | a4c6fb81bbf3871bd2954de30499e4c3a378f5ea (patch) | |
tree | f4eb585dc11732cbadd75b1906ca84d054f90379 /ext/tk | |
parent | b92fe24542bc78863e6889de12c3461068eef42a (diff) | |
download | ruby-a4c6fb81bbf3871bd2954de30499e4c3a378f5ea.tar.gz |
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-jp/bind.rb,
ext/tk/sample/demos-en/widget, ext/tk/sample/demos-en/bind.rb: fix bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk')
-rw-r--r-- | ext/tk/sample/demos-en/bind.rb | 18 | ||||
-rw-r--r-- | ext/tk/sample/demos-en/widget | 2 | ||||
-rw-r--r-- | ext/tk/sample/demos-jp/bind.rb | 18 | ||||
-rw-r--r-- | ext/tk/sample/demos-jp/widget | 6 |
4 files changed, 17 insertions, 27 deletions
diff --git a/ext/tk/sample/demos-en/bind.rb b/ext/tk/sample/demos-en/bind.rb index aabe7f0849..b7e7122c57 100644 --- a/ext/tk/sample/demos-en/bind.rb +++ b/ext/tk/sample/demos-en/bind.rb @@ -94,33 +94,27 @@ TkText.new($bind_demo){|t| } d1.bind('1', proc{ - eval(`cat #{[$demo_dir,'items.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'items.rb'].join(File::Separator)}`) }) d2.bind('1', proc{ - eval(`cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`) }) d3.bind('1', proc{ - eval(`cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`) }) d4.bind('1', proc{ - eval(`cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`) }) d5.bind('1', proc{ - eval(`cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`) }) d6.bind('1', proc{ - eval(`cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`) }) TkTextMarkInsert.new(t, '0.0') diff --git a/ext/tk/sample/demos-en/widget b/ext/tk/sample/demos-en/widget index 3c50582211..adf8cb76ed 100644 --- a/ext/tk/sample/demos-en/widget +++ b/ext/tk/sample/demos-en/widget @@ -896,7 +896,7 @@ end # def aboutBox Tk.messageBox('icon'=>'info', 'type'=>'ok', 'title'=>'About Widget Demo', - 'message'=>"Ruby/Tk widget demonstration Ver.1.6.0-en\n\n" + + 'message'=>"Ruby/Tk widget demonstration Ver.1.6.2-en\n\n" + "based on demos of Tk8.1 -- 8.5 " + "( Copyright:: " + "(c) 1996-1997 Sun Microsystems, Inc. / " + diff --git a/ext/tk/sample/demos-jp/bind.rb b/ext/tk/sample/demos-jp/bind.rb index e1e23b9893..4f9235cfa6 100644 --- a/ext/tk/sample/demos-jp/bind.rb +++ b/ext/tk/sample/demos-jp/bind.rb @@ -91,33 +91,27 @@ TkText.new($bind_demo){|t| } d1.bind('1', proc{ - eval(`cat #{[$demo_dir,'items.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'items.rb'].join(File::Separator)}`) }) d2.bind('1', proc{ - eval(`cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`) }) d3.bind('1', proc{ - eval(`cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`) }) d4.bind('1', proc{ - eval(`cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`) }) d5.bind('1', proc{ - eval(`cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`) }) d6.bind('1', proc{ - eval(`cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`, - _null_binding) + eval_samplecode(`cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`) }) TkTextMarkInsert.new(t, '0.0') diff --git a/ext/tk/sample/demos-jp/widget b/ext/tk/sample/demos-jp/widget index 11495dda54..c84436481a 100644 --- a/ext/tk/sample/demos-jp/widget +++ b/ext/tk/sample/demos-jp/widget @@ -634,7 +634,9 @@ end private :_null_binding def eval_samplecode(code) - Thread.new{ _null_binding.pseudo_toplevel_eval{ eval(code) } }.run + #eval(code) + _null_binding.pseudo_toplevel_eval{ eval(code) } + #Thread.new{ _null_binding.pseudo_toplevel_eval{ eval(code) } } Tk.update end @@ -926,7 +928,7 @@ end # def aboutBox Tk.messageBox('icon'=>'info', 'type'=>'ok', 'title'=>'About Widget Demo', - 'message'=>"Ruby/Tk ウィジェットデモ Ver.1.6.0-jp\n\n" + + 'message'=>"Ruby/Tk ウィジェットデモ Ver.1.6.2-jp\n\n" + "based on demos of Tk8.1 -- 8.5 " + "( Copyright:: " + "(c) 1996-1997 Sun Microsystems, Inc. / " + |