summaryrefslogtreecommitdiff
path: root/ext/tk/sample
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-01 04:58:55 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-01 04:58:55 +0000
commitc07f1bf06e9d17d0e9804f4e0ae2969cfb7e40d1 (patch)
tree3e0f90d10acb95b0dacef42582e26e4e7f378489 /ext/tk/sample
parent5d8f3617e0528ca169c7c6bf32833c9cc9afbe5a (diff)
* forgot to commit a sample script
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample')
-rw-r--r--ext/tk/sample/tkoptdb-safeTk.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/tk/sample/tkoptdb-safeTk.rb b/ext/tk/sample/tkoptdb-safeTk.rb
new file mode 100644
index 0000000000..169cd3c171
--- /dev/null
+++ b/ext/tk/sample/tkoptdb-safeTk.rb
@@ -0,0 +1,18 @@
+#!/usr/bin/env ruby
+
+require 'multi-tk'
+
+TkMessage.new(:text => <<EOM).pack
+This is a sample of the safe-Tk slave interpreter. \
+On the slave interpreter, 'tkoptdb.rb' demo is running.
+The window shown this message is a root widget of \
+the default master interpreter. The other window \
+is a toplevel widget of the master interpreter, and it \
+has a container frame of the safe-Tk slave interpreter. \
+You can delete the slave by the button on the toplevel widget.
+EOM
+
+file = File.expand_path('tkoptdb.rb', File.dirname(__FILE__))
+MultiTkIp.new_safeTk{load file}
+
+# mainloop is started on 'tkoptdb.rb'