Re: object oriented approach

From: Date: Sat, 13 Dec 2003 12:12:55 +0000
Subject: Re: object oriented approach
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4294@lists.php.net to get a copy of this message
Hi you can do the hello world example with OOP with this form: <?PHP dl("php_gtk.so"); class HelloWorld { var $widgets = array(); function HelloWorld() { $this->widgets['window'] = new GtkWindow(); $this->widgets['window'] ->connect('destroy', array('gtk', 'main_quit')); $this->widgets['window'] ->set_usize(500, 500); $this->widgets['window'] ->show_all(); gtk::main(); } } $window = new HelloWorld(); ?> Regards Ivan El sáb, 13 de 12 de 2003 a las 12:18, Szilard Novaki escribió: > Hi! > > I'm a newbie at php-gtk. It's very impressive, but i'd like to use it in > object oriented way. > > I've read a hello-world application. It very simple, but I could not > convert it to an object oriented structure, because the event callback > (as far as I see) is a php function. Could anyone send me an object > oriented php-gtk application, where the gtk widgets are objects? A hello > world application would be just fine. > > Thank you, > Szilard

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