From: Silkmoth Silkmoth Date: 2011-05-07T04:09:51+09:00 Subject: Ruby Gtk2 and signal_connect method Hi, I am writting a little script for displaying a list of icons and when i clic on one of the icon it should return the absolute path of the icon. So i create a windows widget which contain a table widget. In each cell of the table I put an icon and create an event with this code: #for a in 0..( @my_icons_files_array.length - 1) # my_widget =Gtk::Image.new(@my_icons_files_array[a]) # event_box[a] = Gtk::EventBox.new.add(my_widget) # event_box[a].signal_connect("button_press_event") do # ... # # end # table.attach(event_box[a],col_begin,( col_begin + 1 ), row_begin, (row_begin + 1 )) #end Is there a way to get a reference of the objet I have cliqued on in order to link this reference with the path used in Gtk::Image.new Thanks -- Posted via http://www.ruby-forum.com/.