Re: Basic OOP style app driving me crazy
| From: | Michael Crowl | Date: | Tue, 24 Jan 2006 05:45:52 +0000 |
| Subject: | Re: Basic OOP style app driving me crazy | ||
| References: | 1 2 3 4 5 6 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6557@lists.php.net to get a copy of this message | ||
FYI, this is PH-GTK 1.0.2. And I can get other scripts to work,
including an initial linear version of the script below, just not the
OOP version.
Michael Crowl wrote:
> Well, I had fleshed out my app into a class, but it would never actually
> run, no errors, no shell window, nothing, on W2K.
>
> I've removed just about everything, and I can't even get a blank window
> to pop up... Halp!?
>
>
> ==============================
>
> if(!extension_loaded('gtk')) {
> dl('php_gtk.' . PHP_SHLIB_SUFFIX);
> }
>
>
> $app = new myApp();
> $app->run();
>
>
> class myApp() {
>
> var $oWin;
>
> function myApp() {
>
> $oWin = &$this->oWin;
> $oWin = &new GtkWindow();
>
> $oWin->set_title('myApp');
> $oWin->connect('destroy', array(&$this, 'shutdown'));
> $oWin->connect('delete-event', array(&$this, 'delete_event'));
> $oWin->set_border_width(1);
> $oWin->set_default_size(590,390);
>
> $oWin->show_all();
>
> }
>
>
> function run() {
> gtk::main();
> }
>
> function shutdown() {
> gtk::main_quit();
> }
>
> }
>
--
| Michael Crowl
| Web Developer
| octopus@serv.net