Re: unexpected T_VARIABLE
| From: | Rich Payne | Date: | Wed, 15 May 2002 19:44:35 +0000 |
| Subject: | Re: unexpected T_VARIABLE | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1990@lists.php.net to get a copy of this message | ||
> // Load the PHP-GTK extension
> $extension = "php_gtk" . (strpos(PHP_OS, "WIN") >= 0 ? ".dll"
> : ".so");
> dl($extension);
> // Create a new window
> $window = &new GtkWindow();
> $window->set_title("Add Users");
> $window->set_usize(300, 150);
> $window->set_position(GTK_WIN_POS_CENTER);
> $window->set_policy(false, false, false);
> // Set a callback function for the destroy signal
> $window->connect("destroy", "killwin");
> function killwin()
> {
> echo("Window Destroyed!\n");
> gtk::main_quit();
> }
>
>
> //add a vbox
> $box = &new gtkvbox();
> $window->add($box);
>
> //add the 2 text boxes and button
>
> $user = &new GtkEntry();
> $user->set_text("User-Name!");
> $box->pack_start($user);
>
> $pass = &new GtkEntry();
> $pass->set_text("Pass!")
^^ missing semicolon
> $box->pack_start($pass);
>
> $axx = &new GtkEntry();
> $axx->set_text("Access!");
> $box->pack_start($axx);
>
> $button = &new gtkbutton(Add User!);
^^^^^^^^^^ You need "" around that.
After those fixes it ran for me.
--rdp
--
Rich Payne
http://talisman.mv.com