another class question/problem

From: Date: Mon, 05 Mar 2001 22:11:02 +0000
Subject: another class question/problem
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-341@lists.php.net to get a copy of this message
I've run into another problem, and can't figure out what I'm doing wrong. I've created a class that extends GtkWindow, code looks like this (some of the GUI code has been removed for simplicity): class Add_Window extends GtkWindow { var $add_button; function Add_Window() { $add_button = &new GtkButton("Add To DB"); } function get_add_button() { global $add_button; return $add_button; } } Now, from another php file I create an instance of this class, then try to register and event handler for the button, something like: $add_sys_window = &new Add_Window(); $add_sys_window_add_button=$add_sys_window->get_add_button(); $add_sys_window_add_button->connect('clicked',add_to_db); however, what happens is that I get one event when the window is created, and nothing else...I can click on that button all day and no events seem to get deliverd to the calling code. Any ideas? I'm pretty sure I used to do similar things in Java a while back w/o any trouble. TIA, --rdp -- Rich Payne rpayne@alphalinux.org www.alphalinux.org

« previous php.gtk (#341) next »