diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-02 11:19:30 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-02 11:19:30 +0000 |
| commit | 5550b17ca7fdf4f12cb8a45824361856a2383efc (patch) | |
| tree | 77452e34b93358f16499b0025c551d5771abfdb7 /ext/tcltklib/sample/sample0.rb | |
| parent | da33e8235310827139ca01e6d352f95fb93cd751 (diff) | |
| download | ruby-5550b17ca7fdf4f12cb8a45824361856a2383efc.tar.gz ruby-5550b17ca7fdf4f12cb8a45824361856a2383efc.tar.xz ruby-5550b17ca7fdf4f12cb8a45824361856a2383efc.zip | |
* ext/tcltklib: merge into ext/tk and remove.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib/sample/sample0.rb')
| -rw-r--r-- | ext/tcltklib/sample/sample0.rb | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/ext/tcltklib/sample/sample0.rb b/ext/tcltklib/sample/sample0.rb deleted file mode 100644 index cd4c8069b..000000000 --- a/ext/tcltklib/sample/sample0.rb +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/local/bin/ruby -vd - -# tcltklib ライブラリのテスト - -require "tcltklib" - -def test - # インタプリタを生成する - ip1 = TclTkIp.new() - - # 評価してみる - print ip1._return_value().inspect, "\n" - print ip1._eval("puts {abc}").inspect, "\n" - - # ボタンを作ってみる - print ip1._return_value().inspect, "\n" - print ip1._eval("button .lab -text exit -command \"destroy .\"").inspect, - "\n" - print ip1._return_value().inspect, "\n" - print ip1._eval("pack .lab").inspect, "\n" - print ip1._return_value().inspect, "\n" - - # インタプリタから ruby コマンドを評価してみる -# print ip1._eval(%q/ruby {print "print by ruby\n"}/).inspect, "\n" - print ip1._eval(%q+puts [ruby {print "print by ruby\n"; "puts by tcl/tk"}]+).inspect, "\n" - print ip1._return_value().inspect, "\n" - - # もう一つインタプリタを生成してみる - ip2 = TclTkIp.new() - ip2._eval("button .lab -text test -command \"puts test ; destroy .\"") - ip2._eval("pack .lab") - - TclTkLib.mainloop -end - -test -GC.start - -print "exit\n" |
