From: Hidetoshi NAGAI Date: 2004-05-16T08:41:47+09:00 Subject: Re: Using TkTree - Desperately need help Hi, From: dejaspam@batkins.com (Bill Atkins) Subject: Re: Using TkTree - Desperately need help Date: Sat, 15 May 2004 05:18:52 +0900 Message-ID: > I tried that but I get these errors when I run tktree.rb > > C:/Program Files/Arachno Ruby IDE/ruby/lib/ruby/1.8/tk.rb:1036:in > `tk_call': invalid command name `::tktree::treecreate' (NameError) > from tktree.rb:21:in `create_self' > from C:/Program Files/Arachno Ruby > IDE/ruby/lib/ruby/1.8/tk.rb:3985:in `initialize' > from tktree.rb:60:in `new' > from tktree.rb:60 It shows that your Tcl/Tk libraries linked with Ruby don't load (or fail to load) the tktree library (or definitions). Or your Tcl/Tk libraries are too old and don't support namespaces. If your Tcl/Tk cannot autoload the tktree library, you must load the library to Tcl/Tk interpreter working under Ruby/Tk when requiring tktree.rb. # I intended the way to load in my last mail. # # > (Ans.1) # > (1) call Tk.load_tclscript() # # > (Ans.2) # > (1) store Tcl script as a string, # > and call Tk.ip_eval() # > # > ex1: Tk.ip_eval(IO.read()) # > # > ex2: Tk.ip_eval(IO.read(< ... Tcl script text ... # > EOT # # Of cource, is your tktree.tcl file. ~~~ -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)