The Little Guy Posted January 28, 2008 Share Posted January 28, 2008 OK, this is my first ever OOP script... When I run it through the command line, I get this error: PHP Warning: GtkArrow::__construct() requires exactly 2 arguments, 0 given in c:\ryan\hello.php on line 11 Warning: GtkArrow::__construct() requires exactly 2 arguments, 0 given in c:\ryan\hello.php on line 11 PHP Fatal error: Uncaught exception 'PhpGtkConstructException' with message 'could not construct GtkArrow object' in c:\ryan\hello.php:11 Stack trace: #0 c:\ryan\hello.php(11): GtkArrow->__construct() #1 c:\ryan\hello.php(17): Hello->__construct() #2 {main} thrown in c:\ryan\hello.php on line 11 Fatal error: Uncaught exception 'PhpGtkConstructException' with message 'could not construct GtkArrow object' in c:\ryan\hello.php:11 Stack trace: #0 c:\ryan\hello.php(11): GtkArrow->__construct() #1 c:\ryan\hello.php(17): Hello->__construct() #2 {main} thrown in c:\ryan\hello.php on line 11 <?php class Hello extends GtkWindow { function __construct() { parent::__construct(); $this->set_title('Arrow'); $this->connect_simple('destroy', array('gtk', 'main_quit')); $arrow = new GtkArrow(); //$arrow->set(0,2); $this->show_all(); } } new Hello(); Gtk::main(); ?> What does that mean? Quote Link to comment https://forums.phpfreaks.com/topic/88232-solved-warning-error-help/ Share on other sites More sharing options...
Daniel0 Posted January 28, 2008 Share Posted January 28, 2008 See: http://gtk.php.net/manual/en/gtk.gtkarrow.constructor.php You need to pass two arguments. I.e. new GtkArrow($something, $something_else). Quote Link to comment https://forums.phpfreaks.com/topic/88232-solved-warning-error-help/#findComment-451457 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.