Re: Re: Program crashes at event

From: Date: Tue, 08 Oct 2002 07:53:49 +0000
Subject: Re: Re: Program crashes at event
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2515@lists.php.net to get a copy of this message
Sebastian Kapp wrote:
"Sebastian Kapp" <lasheimok@web.de> schrieb am 08.10.02 09:18:03:
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) { try
function bla (&$lab) { otherwise you end up with a copy not a reference of the same object = this looks like it will change with PHP5 though :)
$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
Oops. Sorry. The error message was: Fatal error: Call to undefined function: set_text() in c3.php on line 11
Any idea? Thanx a lot in advance! :)
______________________________________________________________________________ Keine Chance für Viren! Mit WEB.DE FreeMail sind Sie auf der sicheren Seite - Virenschutz inklusive! http://freemail.web.de/?mc=021129


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