[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    [ruby-talk:29906] Re: ug in Ruby Gtk?
From:       Aaron Malone <aaron () munge ! net>
Date:       2001-12-31 22:23:41
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic