[ANN] update Ruby/Tk for Ruby(1.9|1.8) and Tcl/Tk8.5

H

Hidetoshi NAGAI

Hi,

I committed updates of Ruby/Tk on SVN trunk and ruby_1_8.
Now, almost all part of Ruby/Tk will work with Ruby 1.9.
It's a large change (e.g. the diff-file from previous Ruby 1.8 release
has over 20,000 lines) to support Tcl/Tk8.5 features.
Probably, it has some (many?) bugs.
If you find bugs or have feature request, please send it on this ML.

The most important change is "default widget set is switchable
between standard Tk and Ttk (Tile) extension".

As default, for example, TkButton denotes Tk::Button which is a
standard Tk widget. But after calling "Tk.default_widget_set = :Ttk",
TkButton denotes Tk::Tile::TButton which is a Ttk (Tile) widget.
And calling "Tk.default_widget_set = :Tk", TkButton denotes a
standard Tk widget again.
It means that you can use Ttk widgets on your old Ruby/Tk script.

Of course, supported options of each Ttk widgets are different from
standard Tk widgets. If you use such options (e.g. activeforeground)
on your script, Ttk widgets raise exception about unknown options.

So, I implemented a little danger method:
"TkConfigMethod.__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode)".
If mode is true, "configure" method ignores unknown options.
Although it may raise other troubles, it increases the number of
scripts which work with Ttk widgets.

To try this feature, I added an example "ttk_wrapper.rb" in
"ext/tk/sample" directory.
Please see the usage by "ruby ttk_wrawwper.rb -h"
For example, "ruby ttk_wrapper.rb -t blue tkhello.rb" shows you
a "tkhello.rb" example window but styled by "blue" theme.

I'm very sorry, but this change will not be included into ruby
1.8.7 release. I'm late for the release schedule of 1.8.7.
If you want it for your ruby 1.8, please get it from SVN.
 
H

Hidetoshi NAGAI

Hi,

From: Hidetoshi NAGAI <[email protected]>
Subject: [ANN] update Ruby/Tk for Ruby(1.9|1.8) and Tcl/Tk8.5
Date: Sat, 29 Mar 2008 16:02:07 +0900
Message-ID: said:
I committed updates of Ruby/Tk on SVN trunk and ruby_1_8.

If you use Tcl/Tk stubs (--enable-tcltk-stubs),
latest comitted version of tcltkilb seems to cause SEGV.
I'm very sorry, but please don't use Tcl/Tk stubs until
the bug will be fixed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top