Re: function call notebook tab click. how?
| From: | Christian Machmeier | Date: | Wed, 10 Sep 2003 14:26:59 +0000 |
| Subject: | Re: function call notebook tab click. how? | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3852@lists.php.net to get a copy of this message | ||
Hy Rich Payne, you wrote:
> Can you show us some code?
Thx for quick answer. Here's what I got:
$notebook = $glade->get_widget('notebook');
$notebook->connect ('switch-page', 'loadEmployees');
function loadEmployees()
{
global $db, $glade;
// employees
$list = GL::getInstance('Usr', 'Common', $db);
$list->setIDField('usrID');
$list->load(0, 50);
// get widget object.
$clist = $glade->get_widget("employeesClist");
// initialize array.
$employees = array();
// iterate through result.
while ($obj = $list->nextElement()) {
// assign result set to array.
$employees[0] = $obj->getID();
$employees[1] = $obj->getTVorname();
$employees[2] = $obj->getTNachname();
$employees[3] = $obj->getXGebDat();
// insert array into clist.
$clist->insert(0, $employees);
}
}
The Message in the shell...
Notice: main(): internal error: GTK_TYPE_POINTER unsupported
in C:\GtkDev\dev\scs\0.03\scs.php on line 29
... comes from "Gtk::main();" (Line 29 in scs.php). So I can't think
what should be wrong about this.
regards > christian