From: Jim Menard Date: 2001-09-11T21:19:23+09:00 Subject: [ruby-talk:21083] Re: Is Ruby/Tk being maintained? matz@ruby-lang.org (Yukihiro Matsumoto) writes: > Hi, > > In message "[ruby-talk:20947] Is Ruby/Tk being maintained?" > on 01/09/06, Albert Wagner writes: > > |I there an active maintainer of Ruby/Tk? I have posted a couple of problems > |that look like bugs in tk.rb. (Or Tk itself)., But have heard back nothing. > > Well, Hidetoshi Nagai is maintaining it. But it seems that he didn't > check English list. I had forwarded your mails to Japanese list. I, too, have reported a bug here. What is the best way to get it to Hidetoshi Nagai? Here's the bug report: I've run into a mystery. I create a TkListbox and fill it with items. They display correctly. When I call list.bbox(i) to retrieve the bounding box of item i, there is a problem. Only the 0'th item returns the bounding box. All others return an empty string. I've tested the Tk logic by creating a similar list using the "wish" shell, and the bounding boxes are returned as I expect, for all values in the list. The Tk docs say that bbox will return an empty string if the whole list element is not visible, but this is not the case. Is this a bug? Here's some Ruby code that will reproduce the problem. #! /usr/bin/env ruby require 'tk' root = TkRoot.new() list = TkListbox.new(root) list.pack(:side=>'left', :fill=>'both') 5.times { | i | list.insert('end', "Item number #{i - 1}") } # Only the 0'th item prints a bounding box; the rest are empty strings 5.times { | i | p list.bbox(i) } Here's some Tk code that's almost equivalent (I don't know TCL). It prints the boxes for all elements. listbox .list pack .list -side left -fill both .list insert end "Item number 0" .list insert end "Item number 1" .list insert end "Item number 2" .list insert end "Item number 3" .list insert end "Item number 4" .list bbox 0 .list bbox 1 .list bbox 2 .list bbox 3 .list bbox 4 Jim -- Jim Menard, jimm@io.com, http://www.io.com/~jimm/ "Any sufficiently advanced technology is indistinguishable from a rigged demo." -- Unknown