okay, for anyone else installing tkext here’s ths scoop.
first you have to install tix (debian testing .deb worked fine although
the .so will be under /usr/lib, not use/local/lib)
then unpack tkext. warning! it extracts directly into the working
directory.
then you need to edit the Tix.def file and make sure the .so library
name is correct and the path is correct.
then run ruby mk_tkextlib.rb -p Tix (i’m not sure what -b does,
somthing about dynamic behavior, but i got the notion that is was
probably undesired) -v is verbose and appears to spit out BASE_INFO, or
a derivation of it. don’t have any clue about -g. note you’ll probably
notice a couple warnings about deprecated functions. these are simply
functions that don’t match up with tkext’s expectations (because tix has
since changed). nothing to worry about, just don’t try to use those.
now, copy the 3 main libraries: tkext.rb, tcltkext.rb, and
tcltkextlib.rb into your ruby installation path. i recommend just
putting it in the main /usr/lib/ruby/1.6/ path along with all the other
tk stuff that’s already there.
also copy Tix.rb and Tix.inf to somewhere in the ruby path. best to put
them with the rest, although they could go else where, but they must be
placed together!
when wirtting your scripts just use require ‘Tix’.
a number of the test apps don’t work! this is beacuse they bypass
require ‘Tix’ and instead require the main libraries directly. this
requires them to manually point to the location of the tix .so. to get
them to work you will have to edit each script and change the name and
path, just like you did with Tix.def.
taht’s it. now if i can just find some api docs…
hope this is helpful.
by the way i’m currently comparing tk+tix to fxruby to see how they
match up.
hey, does anyone want to automate this proc?
~transami
···
On Fri, 2002-07-12 at 00:16, Tom Sawyer wrote:
the same thing happend to me with another library, i forget which. i had
to download the ruby source tarball and extract it and copy the missing
file(s) to my distribution. worked.
related to tcltk has anyone gotten the tkext to work? i’m messing with
the installation. i have tix installed. and i’ve edited the Tix.def file
to point to my tix path and ran mk_tkextlib.rb -p Tix. that ran fine,
then i copied the 3 .rb libraries (tkext, tcltkext, tcltkextlib) to my
ruby installtion location. when i test it out i get an error saying it
can’t find the library, but not the library i specified in Tix.def. its
still looking for the default one. any ideas on how to fix this?
~tranasmi
p.s. what’s Tix-for-TkPackage.rb, too?
On Thu, 2002-07-11 at 21:51, nagai@ai.kyutech.ac.jp wrote:
Hi,
From: katiedhe@hotmail.com (Dandan He)
Subject: Ruby/Tk, TkMessage
Date: Tue, 9 Jul 2002 14:45:48 +0900
Message-ID: 5d85b7fe.0207082127.3f806f76@posting.google.com
I need to use a Ruby/Tk widget to display some read-only information,
which can be multi-line. I need the widget to be displayed as a
certain size (say, width=100, height=50) even when it doesn’t have any
text in it. I would use TkText if there is a way to make it read-only.
Use a frame widget with fixed size.
If you want to use Pack geometry manager only,
you must do TkPack.propagate(, false)
to block the propagation of size.
For example,
require ‘tk’
f = TkFrame.new(nil, ‘width’=>100, ‘height’=>50).pack
TkPack.propagate(f,false)
TkMessage.new(f, ‘text’=>‘1111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000’).pack
Tk.mainloop
As you see when you run it,
the center part of the message widget is shown.
But if you want to show upper-left corner of the message widget,
probably you must use Place geometry manager.
For example,
require ‘tk’
f = TkFrame.new(nil, ‘width’=>100, ‘height’=>50).pack
TkMessage.new(f, ‘text’=>‘1111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000’).place(‘x’=>0, ‘y’=>0)
Tk.mainloop
In this case, no need TkPack.propagate.
The message widget has no influence on the frame widget,
because the message widget is not known by Pack geometry manager.
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
–
~transami
“They that can give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety.”
– Benjamin Franklin
–
~transami
“They that can give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety.”
– Benjamin Franklin