Re: php-gtk glade mysql
| From: | suomaf | Date: | Fri, 25 Aug 2006 01:08:08 +0000 |
| Subject: | Re: php-gtk glade mysql | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-7107@lists.php.net to get a copy of this message | ||
Hello Benjamin,
I am just happy no one complains about my english =)
Does this mean that I have to get rid of the signal in the glade file? So I
should change my .php to as follows? I seem to be missing something when i
run it, the signals seem not to be connected.
kind regards,
suomaf
<?php
class MyClass
{
function load_glade()
{
$this->glade = new GladeXML(dirname(__FILE__) . '/gmsdialog.glade');
$this->glade->signal_autoconnect_instance($this);
}
function on_cancelButton_clicked()
{
Gtk::main_quit();
}
function on_loginButton_clicked(GtkButton $btn)
{
$loginName = $this->glade->get_widget("loginEntry")->get_text();
$password = $this->glade->get_widget("passwordEntry")->get_text();
echo $loginName;
echo $password;
}
function staticMethod()
{
echo "MyClass::staticMethod()\r\n";
}
}
$glade = new GladeXML(dirname(__FILE__) . '/gmsdialog.glade');
//Let glade do all the signal connections we specified in the file
// but this time, connect to the object methods
$myClassInstance = new MyClass();
//Start the main loop
Gtk::main()
?>
--
View this message in context: http://www.nabble.com/php-gtk-glade-mysql-tf2157838.html#a5975802
Sent from the Php - GTK - General forum at Nabble.com.