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:
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
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.