GladeXML question

From: Date: Fri, 30 Nov 2001 12:01:36 +0000
Subject: GladeXML question
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-778@lists.php.net to get a copy of this message
Hy, I am just playing around with Glade and using it's XML to make php-gtk interfaces. I can generate interfaces, but i have problems finding the objects which are generated to accesss their values. Attached code gives me the error: <b>Fatal error</b>: Call to a member function on a non-object in <b>/home/henning/Projects/phpgtkmyadmin/phpgtkmyadmin.php</b> on line <b>19</b><br /> I know I have somehow to give the Gtk Objects as arguments to the on_start_clicked functin, but I can't even find the ojects in the main program scope (e.g. $host_field doesn't seem to exist as an object), and if I would I wouldn't know how to pass them to the function as there is no information about that on the GtlXML funtctions. any guesses? henning -- Henning Sprang , henning@sprang.de, http://www.sprang.de/

<?xml version="1.0"?> <GTK-Interface> <project> <name>Phpgtkmyadmin</name> <program_name>phpgtkmyadmin</program_name> <directory></directory> <source_directory>src</source_directory> <pixmaps_directory>pixmaps</pixmaps_directory> <language>Ada 95</language> <gnome_support>False</gnome_support> <gettext_support>False</gettext_support> </project> <widget> <class>GtkWindow</class> <name>window1</name> <title>window1</title> <type>GTK_WINDOW_TOPLEVEL</type> <position>GTK_WIN_POS_NONE</position> <modal>False</modal> <allow_shrink>False</allow_shrink> <allow_grow>True</allow_grow> <auto_shrink>False</auto_shrink> <widget> <class>GtkVBox</class> <name>vbox1</name> <homogeneous>False</homogeneous> <spacing>0</spacing> <widget> <class>GtkEntry</class> <name>host_field</name> <can_focus>True</can_focus> <editable>True</editable> <text_visible>True</text_visible> <text_max_length>0</text_max_length> <text>host</text> <child> <padding>0</padding> <expand>False</expand> <fill>False</fill> </child> </widget> <widget> <class>GtkEntry</class> <name>user_field</name> <can_focus>True</can_focus> <editable>True</editable> <text_visible>True</text_visible> <text_max_length>0</text_max_length> <text>user</text> <child> <padding>0</padding> <expand>False</expand> <fill>False</fill> </child> </widget> <widget> <class>GtkEntry</class> <name>pass_field</name> <can_focus>True</can_focus> <editable>True</editable> <text_visible>True</text_visible> <text_max_length>0</text_max_length> <text>pass</text> <child> <padding>0</padding> <expand>False</expand> <fill>False</fill> </child> </widget> <widget> <class>GtkEntry</class> <name>db_field</name> <can_focus>True</can_focus> <editable>True</editable> <text_visible>True</text_visible> <text_max_length>0</text_max_length> <text>db</text> <child> <padding>0</padding> <expand>False</expand> <fill>False</fill> </child> </widget> <widget> <class>GtkEntry</class> <name>sql_field</name> <can_focus>True</can_focus> <editable>True</editable> <text_visible>True</text_visible> <text_max_length>0</text_max_length> <text>sql</text> <child> <padding>0</padding> <expand>False</expand> <fill>False</fill> </child> </widget> <widget> <class>GtkButton</class> <name>start</name> <can_focus>True</can_focus> <signal> <name>clicked</name> <handler>on_start_clicked</handler> <object>$host_field, $user_field, $pass_field, $sql_field, $db_field</object> <last_modification_time>Fri, 30 Nov 2001 01:25:04 GMT</last_modification_time> </signal> <label>start</label> <relief>GTK_RELIEF_NORMAL</relief> <child> <padding>0</padding> <expand>False</expand> <fill>False</fill> </child> </widget> <widget> <class>GtkScrolledWindow</class> <name>scrolledwindow1</name> <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy> <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy> <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> <child> <padding>0</padding> <expand>True</expand> <fill>True</fill> </child> <widget> <class>GtkText</class> <name>text1</name> <can_focus>True</can_focus> <editable>False</editable> <text>result: </text> </widget> </widget> </widget> </widget> </GTK-Interface> Attachment: [application/x-httpd-php] phpgtkmyadmin.php
« previous php.gtk.general (#778) next »