From: Jacek Podkanski Date: 2002-01-01T02:42:53+09:00 Subject: [ruby-talk:29875] ug in Ruby Gtk? Hi, Can anybody help me? When I execute following piece of code information about selected item is printed three times. Does anybody know why the code responding to item selection is executed three times, when I click on list item only once? #This is the code cb = Gtk::Combo::new() cb.set_popdown_strings(["item0", "item1", "item2", "item3", "item4", "item5", "item6", "item7", "item8", "item9"]) cb.entry.set_text("Select Option") cb.entry.select_region(0, -1) cb.list.signal_connect_after('selection-changed') do $selected_item=cb.entry.get_text print "You have selected ",$selected_item,"\n" #This is puzzling me, the code in the block is executed three times, #while i click on menu only once end box2.pack_start(cb, TRUE, TRUE, 0) cb.show Regards Jacek Podkanski -- Jacek Podkanski