Menu

#175 not all signal connections being performed...

closed
nobody
5
2011-12-01
2011-11-29
12 chairs
No

button.signal_connect("enter-notify-event") {print "hello "}
button.signal_connect("enter-notify-event") {print "world\n"}

The above does what I expect it to do (ie. when I scroll over the button it prints "Hello World" )

button.signal_connect("enter-notify-event") { print "Hello ";[]}
button.signal_connect("enter-notify-event") { print "World\n";[]}

However this code will not perform the second event (nor any subsequent) - When I scroll over the button it prints "Hello " only (not "World\n"). This seems to be because ending the proc performed by the signal in an Array will somehow stop the second signal_connect from performing its associated Proc.

Using Ruby 1.8.6 and ruby-gnome2-0.16.0-1-i386-mswin32.exe (2007-02-12)

Discussion

  • Kouhei Sutou

    Kouhei Sutou - 2011-12-01
    • status: open --> closed
     

Log in to post a comment.