Tk event_generate broken?

Rubies:

I suspect this Ruby version has a broken event_generate.

    ruby 1.8.2 (2004-07-29) [i386-mswin32]

(Feel free to suggest the problem is between the keyboard and chair...)

Below my signature is a mail I posted many moons ago, which I claimed
worked.

I will go back to an old version and see if the problem persists.

···

--
  Phlip
  http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces

require "tk"

def main

        top = TkRoot.new
        canvas = TkCanvas.new (top)
        canvas.grid('row'=>0, 'column'=>0, 'sticky'=>'ew')
canvas.configure('width' => 200, 'height' => 500)

        shape = [30, 30, 30, 60, 60, 30 ]

        poly1 = TkcPolygon.new(canvas, shape) {
            fill 'green'
             }

        poly1.bind ('Button-1') {
            puts 'yo'
            poly1.configure('fill' => 'red')
            Tk.event_generate(poly1, 'Button-1') # <-- yo
            }
        Tk.update
        Tk.event_generate(poly1, 'Button-1')
        Tk.update
        Tk.mainloop

end

Hi,

···

From: "Phlip" <phlip_cpp@yahoo.com>
Subject: Tk event_generate broken?
Date: Wed, 18 Aug 2004 01:55:57 +0900
Message-ID: <8LqUc.2657$ZC7.26@newssvr19.news.prodigy.com>

        poly1 = TkcPolygon.new(canvas, shape) {
            fill 'green'
             }

        poly1.bind ('Button-1') {
            puts 'yo'
            poly1.configure('fill' => 'red')
            Tk.event_generate(poly1, 'Button-1') # <-- yo
            }
        Tk.update
        Tk.event_generate(poly1, 'Button-1')

Unfortunately, if you want to generate events for canvas items,
you must give the coordinate information of the event.
(e.g. Tk.event_generate(poly1, 'Button-1', :x=>36, :y=>36) )
When the target of Tk.event_generate method is a canvas item,
the generated event is sent to the canvas widget which includes
the target item, because Tcl/Tk's event command can't send events
to canvas items directly. It depends on the coordinate of the event
whether the canvas calls the callback procedure of the target item
or not.
--
                                  Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)