From: Hidetoshi NAGAI Date: 2003-07-17T13:09:42+09:00 Subject: Re: Togl widget, where to install it? Hi, From: Massimiliano Mirra - bard Subject: Togl widget, where to install it? Date: Thu, 17 Jul 2003 08:11:54 +0900 Message-ID: <87oezu8460.fsf@prism.localnet> > ["togl", ".w0000"] > => "togl .w0000" > Exception `NameError' at /usr/lib/ruby/1.6/tk.rb:889 - invalid command name `togl' > Exception `RuntimeError' at /usr/lib/ruby/1.6/tk.rb:889 - invalid command name "togl" > Exception `NameError' at /usr/lib/ruby/1.6/tk.rb:604 - invalid command name `togl' > /usr/lib/ruby/1.6/tk.rb:604:in `tk_call': invalid command name `togl' (NameError) > from /home/bard/lib/ruby/togl.rb:54:in `create_self' > from /usr/lib/ruby/1.6/tk.rb:2229:in `initialize' > from test.rb:3:in `new' > from test.rb:3 > tcltklib: Tcl_DeleteInterp > > Where should the togl.so be put in order for ruby/tk to be able to > access it? I tried the directories mentioned in the debug output > (/usr/lib/tcl8.3 /usr/lib /usr/lib/tk8.3) with no result. Probably, ToGL library is not loaded to Tk interpreter. ToGL bridge for ruby requires to link the ToGL library to tcltklib (written on the 'README.euc' file). If the library cannot create as a loadable module, 'link to tcltklib' is the only way to use it on Ruby/Tk. But if your Tcl/Tk can load the library by 'package' command, you can use TkPackage module to load the library to Ruby/Tk. Please use TkPackage.require to load the library. If succeed, the library will be loaded and 'togl' command will be defined on the Tk interpreter. After that, togl.rb will work fine. # I don't use the library. # So, I don't check whether the library works or not. -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)