Re: Please could a 'nix person run this script?
| From: | Rich Payne | Date: | Wed, 16 Jan 2002 02:13:40 +0000 |
| Subject: | Re: Please could a 'nix person run this script? | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1003@lists.php.net to get a copy of this message | ||
Works for me Steph.
OS info:
[rdp@nobleman rdp]$ uname -a
Linux nobleman.d1062.com 2.4.17 #9 Thu Jan 10 12:17:34 EST 2002 alpha
unknown
[rdp@nobleman rdp]$ /usr/local/bin/php -v
4.1.1
php-gtk is CVS from....Jan 3.
hope that helps.
--rdp
On Wed, 16 Jan 2002, Steph wrote:
> Works here, needs testing on nix before I throw it into docs. Please say which o/s. Thanks.
>
> <?
> dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' :
> 'so'));
>
> function here_goes($button) {
> $child = $button->child;
> echo $child->get()."\n";
> }
>
> $window = &new GtkWindow();
> $window->connect_object('destroy', array('gtk', 'main_quit'));
> $window->set_title('GtkRadioButton demo');
>
> $box = &new GtkVBox();
> $window->add($box);
>
> $button1 = &new GtkRadioButton(null, 'button 1');
> $button1->connect('pressed', 'here_goes');
> $box->pack_start($button1);
>
> for ($i = 2; $i <= 4; $i++) {
> $button = &new GtkRadioButton($button1, 'button ' . $i);
> $button->connect('pressed', 'here_goes');
> $box->pack_start($button);
> }
>
> $button_end = &new GtkButton('Exit');
> $button_end->connect_object('clicked', array('gtk',
> 'main_quit'));
> $box->pack_end($button_end);
>
> $window->show_all();
>
> gtk::main();
> ?>
>
>
>
--
Rich Payne
http://talisman.mv.com