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

**URL:** <https://www.ruby-forum.com/t/update-ruby-tk-for-ruby-1-9-1-8-and-tcl-tk8-5/133248>\
**Category:** Ruby\
**Created:** [March 29, 2008, 8:02am UTC](https://www.ruby-forum.com/t/update-ruby-tk-for-ruby-1-9-1-8-and-tcl-tk8-5/133248 "2008-03-29T08:02:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hidetoshi\_NAGAI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/49beb7/32.png) [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Post date:** [March 29, 2008, 8:02am UTC](https://www.ruby-forum.com/t/update-ruby-tk-for-ruby-1-9-1-8-and-tcl-tk8-5/133248/1 "2008-03-29T08:02:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Hidetoshi\_NAGAI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/49beb7/32.png) [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Post date:** [March 30, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/update-ruby-tk-for-ruby-1-9-1-8-and-tcl-tk8-5/133248/2 "2008-03-30T20:10:40Z")

</div>

Hi,

From: Hidetoshi NAGAI [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

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