From: Aaron Malone Date: 2002-01-01T07:23:41+09:00 Subject: [ruby-talk:29906] Re: ug in Ruby Gtk? On Tue, Jan 01, 2002 at 02:42:53AM +0900, Jacek Podkanski wrote: > 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 I found a reference to this on the gtk-list using google: http://mail.gnome.org/archives/gtk-list/1999-October/msg00380.html The suggested workaround is to connect to the 'hide' method of the popup, which works just fine in my brief testing. cb.popwin.signal_connect('hide') do $selected_item=cb.entry.get_text print "You have selected ",$selected_item,"\n" end -- Aaron Malone (aaron@semo.net) System Administrator "Never tell the truth to Poplar Bluff Internet, Inc. those unworthy of it." http://www.semo.net -- Mark Twain