From: takaoueda@... Date: 2001-01-27T12:10:02+09:00 Subject: [ruby-talk:9973] Ruby/Tk Newbie It seems to me that "@root" in p. 157 , Programming Ruby is an error for "root." The following is a complete program I made of the sample code. require 'tk' class Picture def initialize(root) image1 = TkPhotoImage.new { file "img1.gif" } image2 = TkPhotoImage.new { file "img2.gif" } b = TkButton.new(root) { image image1 command proc {doit} } b.bind("Enter") { b.configure('image'=>image2) } b.bind("Leave") { b.configure('image'=>image1) } b.pack('side'=>'left', 'padx'=>10, 'pady'=>10) end end parent = TkRoot.new{ title 'Pictures' } Picture.new(parent) Tk.mainloop Regards, Takao Sent via Deja.com http://www.deja.com/