From: Hidetoshi NAGAI Date: 2003-06-21T18:09:41+09:00 Subject: create safe-Tk interpreter (Re: embed Ruby/TK app in a web page) Hi, From: John Fletcher Subject: embed Ruby/TK app in a web page Date: Thu, 19 Jun 2003 20:42:48 +0900 Message-ID: <3EF19BFC.E55FF83A@aston.ac.uk> > I am looking for a way to embed Ruby/Tk apps in a web page. I committed patch for tcltklib.c. Now, you can create a safe interpreter with safe-Tk on Ruby/Tk. For exapmle, --------------------------------------------- require 'tk' safeip = Tk::INTERP._eval('::safe::interpCreate') Tk::INTERP._eval('::safe::loadTk ' + safeip) Tk::INTERP._eval(safeip + ' eval button .b -text SlaveIP -command exit') Tk::INTERP._eval(safeip + ' eval pack .b') Tk.mainloop --------------------------------------------- To control slave-interpreters on tk.rb will be supported in the future. Maybe it is a first step of Ruby/Tklet. :-) -- Hidetoshi Nagai (nagai@ai.kyutech.ac.jp)