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