Program crashes at event
| From: | Sebastian Kapp | Date: | Tue, 08 Oct 2002 07:18:04 +0000 |
| Subject: | Program crashes at event | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-2516@lists.php.net to get a copy of this message | ||
Hello!
I wanted a gtk-php prog to react for an event, but it always crashes at this event, in Linux as in
Windows. To find the problem, I removed from the program everything that worked, here's
what's left:
<?php
if (!class_exists('gtk')) {
if (strtoupper(substr(PHP_OS, 0,3) == 'WIN'))
dl ('php_gtk.dll');
else
dl ('php_gtk.so');
}
function bla ($lab) {
$lab->set_text ("");
}
$window = &new GtkWindow ();
$lab = &new GtkLabel ("bla.");
$evb = &new GtkEventBox ();
$evb->add ($lab);
$evb->connect ('button_release_event', 'bla', $lab);
$window->add ($evb);
$window->show_all();
gtk::main();
?>
It creates a label, that's added to an eventbox, that's added to a window. The eventbox
reacts to the 'button_release_event', and crashes with
Fatal error: Call to undefined function: () in c3.php on line 19
Any idea?
Thanx a lot in advance! :)
______________________________________________________________________________
Jetzt testen für 1 Euro! Ihr All-in-one-Paket!
https://digitaledienste.web.de/Club/?mc=021106