Re: How to disconnect an event?

From: Date: Thu, 10 Jan 2008 23:46:25 +0000
Subject: Re: How to disconnect an event?
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-8147@lists.php.net to get a copy of this message
the following code gives an example and works fine for me. without the disconnect there would be spam in the console every time a keyboard is pushed while the window has focus. <?php function quick_test($w,$e) { print_r($e); return; } $w = new GtkWindow; $w->connect_simple('delete-event',array('Gtk','main_quit')); $signal = $w->connect('key-press-event','quick_test'); $w->disconnect($signal); $w->show_all(); Gtk::main(); ?> ManarKh wrote:
Hello, :) I have an application in which i connect a gtkeventbox to a function. $handler_id = EventBox->connect('button-press-event', array($this, 'function')); Then at later stage i need to disconnect it using disconnect($handler_id); but it's not working. Anyone knows a way to disconnect an event from gtkeventbox? Regards, Manar
-- Bob Majdak Jr KateOS Rofflecopter Pilot http://www.kateos.org

« previous php.gtk.general (#8147) next »