Re: How to disconnect an event?
| From: | Bob Majdak Jr | Date: | Fri, 11 Jan 2008 00:08:20 +0000 |
| Subject: | Re: How to disconnect an event? | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-8148@lists.php.net to get a copy of this message | ||
Was pointed out to me that maybe I should recreate the actual circumstances.
Here is a code snip applying disconnect to the eventbox and it works fine here, using PHP-GTK2 from CVS (latest) though. code: http://p.opsat.net/v/16j/33
- Bob.
Bob Majdak Jr wrote:
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) {-- Bob Majdak Jr KateOS Rofflecopter Pilot http://www.kateos.orgprint_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