Update Ruby/Tk for Ruby(1.9|1.8) and Tcl/Tk8.5

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.

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: [email protected]

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs