From: Thomas Sondergaard Date: 2002-03-11T00:56:22+09:00 Subject: Fiddling with ruby/tk canvas I've got a TkCanvas with a number of TkcImage items on it. I've set it up (with canvas.itembind) so a TkMenu is popped up, when the user right-clicks one of my TkcImage items, but I need to figure out which item in the canvas I got the mouseclick event from, and I don't know how to do that. Here's some code. I'd like to know what I should ask the TkComm::Event instance I get in the proc below, to have it tell me what item I right-clicked. canvas = TkCanvas.new canvasImg2 = TkcImage.new(canvas, 200, 200, 'image'=>image) canvasImg2.addtag 'bingopoint' canvas.itembind('bingopoint', 'ButtonPress-3', proc { |e| puts "get canvasImg2 instance from e, but how?" }) I've spend a few hours now with ruby/tk, and I really miss some documentation. My pick axe book tells me that the best documentation for ruby/tk is probably a book about perl/tk. Is this still so? Is the perl book (Learning Perl/Tk: Graphical User Interfaces with Perl) actually a reliable reference/tutorial for ruby/tk? Cheers, Thomas