[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Theming Tk with tile

Sy Ali

3/10/2007 12:31:00 AM

I have a dream: My own GUI applications looking like other applications.

I went hunting around for theming for Tk, and bumped into Tile[1].

Tk being legendarily ugly, tile represents a great new hope that with
tile it could be elevated to being barely adequate. </jaded>

I saw a reference that it was available in Ruby's CVS from sometime in
2005, suggesting that there is support in the more recent versions of
Ruby.

I did some hunting, but I couldn't find any references to how to get it going.

Patching together some mailing list references, I think this is how I
could do it:

$ irb
require 'tk'
require 'tkextlib/tile'
Tk::Tile.__Import_Tile_Widgets__

The tile require fails since it's not there. Presumably it's not
included with ruby or ruby-tk with my distribution. That's expected.

I see that there isn't a gem for tile, or my guess at "gem install
tile" isn't right.

I see that I could download tile [2] and built it from source, but
somehow I doubt this would solve my require problem.

I googled, and I searched the mailing lists, but I can't find any
concrete examples of installing or using tile (outside of home
renovations), and I could use a bit of help..

I would also accept answers of "go use toolkit x instead", but I
already intend to do that if I can't get this going.

Also, is tile something I'd have to package with my program or have a
person install with my distributed software? How would that work?



[1] tile tk theming http://tktable.sourceforge...
[2] tile download
http://sourceforge.net/project/downloading.php?group_id=11464&use_mirror=internap&filename=tile-0.7.8.tar.gz&am...

3 Answers

Hidetoshi NAGAI

3/11/2007 2:40:00 PM

0

Sy Ali

3/11/2007 3:16:00 PM

0

On 3/11/07, Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> wrote:
> Please try to run "<ruby lib path>/tkextlib/pkg_checker.rb".
> When its output includes the line
> "Ready : tile.rb : require->{"tile"=>"0.7.8"}",
> your Ruby/Tk is ready for Tile extension.
> If not, probably it will be a kind of search path problem.

I think you're right. pkg_checker.rb gave me errors [1]

I downloaded activetcl, and did ln -s /opt/ActiveTcl-8.4/lib/tcl8.4/
/usr/lib/ so that my pkg_checker.rb could see its libraries. Now
pkg_checker runs, but gives me:

*LACK : tile.rb : require->{} FAIL->[["tile", :package]]

Which is normal since I didn't install tile yet. =)

But, configuring tile gives me an error about "configuration
definitions" [2] .. where do I find these?


Maybe something is wrong because I'm using a ruby-tk package from my
distribution (pclinuxos 2007-test3).

Isn't there a gem for tile? =)


--+

[1] errors with pkg_checker:

$ /usr/lib/ruby/1.8/tkextlib/pkg_checker.rb
/usr/lib/ruby/1.8/tk.rb:1102:in `initialize': Can't find a usable
init.tcl in the following directories: (RuntimeError)
/usr/lib/tcl8.4 /usr/lib/tcl8.4 /lib/tcl8.4 /usr/library /library
/tcl8.4.13/library /usr/lib/tcl8.4



This probably means that Tcl wasn't installed properly.
from /usr/lib/ruby/1.8/tk.rb:1102:in `new'
from /usr/lib/ruby/1.8/tk.rb:1102
from ./pkg_checker.rb:7:in `require'
from ./pkg_checker.rb:7

--+

[2] configuring tile gives an error about "configuration definitions"

$ ./configure --with-tcl=/opt/ActiveTcl-8.4/lib/
checking for correct TEA configuration... ok (TEA 3.5)
checking for Tcl configuration... found /opt/ActiveTcl-8.4/lib/tclConfig.sh
checking for existence of /opt/ActiveTcl-8.4/lib/tclConfig.sh... loading
checking for Tk configuration... configure: WARNING: Can't find Tk
configuration definitions

Hidetoshi NAGAI

3/11/2007 3:30:00 PM

0