Re: extending GTK Classes

From: Date: Sun, 04 Mar 2001 00:08:38 +0000
Subject: Re: extending GTK Classes
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-223@lists.php.net to get a copy of this message
You are not calling the constructor of the parent class. add this line to your constructor $this->GtkWindow(); and your parent class will be initialized as well. - Frank > > I've just started playing around with php-gtk and must say I like > it..however I have one problem/question. I'm trying to create a class > that extends GtkWindow...it looks something like this: > > <?php > dl('php_gtk.so'); > > class Show_Window extends GtkWindow { > function Show_Window() { > $this->set_title("Select System"); > } > } > ?> > > and in another php file I include this file, and do the following: > > $window = &new Show_Window(); > > however when this gets called I get: > > <b>Fatal error</b>: Underlying object missing in > <b>/home/rdp/sysman/show_window.php</b> on line <b>7</b><br> > > Now I'm assuming this is happening because I'm not explicitly calling the > parent's constructor method? How might I do that? > > TIA, > --rdp > > -- > Rich Payne > rpayne@alphalinux.org www.alphalinux.org > > > -- > PHP GTK Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net > For additional commands, e-mail: php-gtk-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.gtk (#223) next »