Problem to connect a standard callback destroy

From: Date: Sun, 18 Jul 2004 20:40:28 +0000
Subject: Problem to connect a standard callback destroy
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4783@lists.php.net to get a copy of this message
Hello I have a littel bit of trouble in this code: On line 15 I want to be able to connect the clicked signal to the standard destroy callback function of gtk , but I get the error that he can't find it. Well I found a little solution but it is more patch on line 29 to destroy the FileSelectionBox in my first callback function If someone has an idea Thx 1 class FileDialog 2 { 3 //public variabels 4 var $filename; 5 var $pathname; 6 //private variabels 7 var $FileDg; 8 function FileDialog(){ 9 10 $this->FileDg = &new GtkFileSelection("Select a File"); 11 12 $ok_button = $this->FileDg->ok_button; 13 14 $ok_button->connect_object('clicked',array(&$this,'EndDialog',)); 15 $ok_button->connect_object('clicked', array('&Gtk','destroy')); 16 17 $cancel_button = $this->FileDg->cancel_button; 18cancel_button->connect_object('clicked',array(&$this,'canceldialog')); 19 20 $cancel_button->connect_object('clicked', array('destroy')); 21 22 $this->FileDg->show(); 23 24 } 25function EndDialog() { 26 print "OK button clicked, "; 27 print $this->FileDg->get_filename(); 28 print " selected.\n"; 29 $this->FileDg->destroy(); } function CancelDialog() { print("Cancel button clicked\n"); $this->FileDg->destroy(); } }

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