note 596 added to tutorials.hellow.php

From: Date: Thu, 20 Oct 2005 21:23:40 +0000
Subject: note 596 added to tutorials.hellow.php
Groups: php.gtk.webmaster 
Request: Send a blank email to php-gtk-webmaster+get-2851@lists.php.net to get a copy of this message
OO version: <?php if (!extension_loaded('gtk')) { dl('php_gtk.' . PHP_SHLIB_SUFFIX); } class test { var $window; var $button; function test () { $this->window =& new GtkWindow(); $this->window->connect("destroy", array($this, "shutdown")); $this->window->connect("delete-event", array($this, "delete_event")); $this->window->set_border_width(8); $this->button =& new GtkButton("Hello World."); $this->button->connect("clicked", array($this, "hello")); $this->window->add($this->button); $this->window->show_all(); } function hello () { print "Hello World!\n"; $this->window->destroy(); } function shutdown () { print "Shutting down.\n"; gtk::main_quit(); } function delete_event () { return false; } } $test =& new test(); gtk::main(); ?> http://gtk.php.net:80/manual/en/tutorials.hellow.php

« previous php.gtk.webmaster (#2851) next »