is this a bug or expected ??

From: Date: Thu, 19 Jul 2001 15:52:48 +0000
Subject: is this a bug or expected ??
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2284@lists.php.net to get a copy of this message
Can someone tell me if this is "normal" for php or not...my feelings would be that there's something wrong here...anyway. I have a class: <?php dl('php_gtk.so'); Class password_dialog extends GtkWindow { var $test_var; function password_dialog() { $this->GtkWindow(); $this->set_title("Test Window"); $bt = &new GtkButton("TEST"); $this->add($bt); $bt->connect('clicked',array($this,showw)); $value="Test String \n"; $this->sett($value); //$bt->connect('clicked',array($this,showw)); $this->show_all(); } function showw () { echo "var is ".$this->test_var." \n"; } function sett ($val) { $this->test_var = $val; } } we have a class variable ($test_var), now if I run the class the way it is, then clicking the button produces: var is if I move the position of the event connection for the button (comment out the first, uncomment the second) then it works. So where I register for events is going to effect the value of class variables? here's the script that will run this class: #!/usr/bin/php <?php include ('password_dialog.php'); $test = &new password_dialog(); /* Run the main loop. */ Gtk::main(); ?> needless to say my head is spinning on this one..... thanks, --rdp -- Rich Payne rpayne@alphalinux.org www.alphalinux.org

« previous php.gtk (#2284) next »