From: John Fletcher Date: 2003-06-23T17:54:46+09:00 Subject: Re: create safe-Tk interpreter (Re: embed Ruby/TK app in a web page) Hidetoshi NAGAI wrote: > 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) Hi Will this be the version of Ruby/Tk with Ruby 1.8 ? If so I shall need to update and convert my codes, as I am working with 1.6.7 at present. John