E_STRICT and PHP-Gtk2

From: Date: Mon, 15 May 2006 05:45:27 +0000
Subject: E_STRICT and PHP-Gtk2
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2850@lists.php.net to get a copy of this message
Hi all, When enabling E_STRICT in error_reporting of php.ini, I get the following notices: PHP Strict Standards: Declaration of GtkToolbar::set_style() should be compatible with that of GtkWidget::set_style() in Unknown on line 0 PHP Strict Standards: Declaration of GtkMenu::set_accel_path() should be compatible with that of GtkWidget::set_accel_path() in Unknown on line 0 PHP Strict Standards: Declaration of GtkWindow::mnemonic_activate() should be compatible with that of GtkWidget::mnemonic_activate() in Unknown on line 0 PHP Strict Standards: Declaration of GtkMenuItem::set_accel_path() should be compatible with that of GtkWidget::set_accel_path() in Unknown on line 0 PHP Strict Standards: Declaration of GtkStatusbar::remove() should be compatible with that of GtkContainer::remove() in Unknown on line 0 PHP Strict Standards: Declaration of GtkCList::remove() should be compatible with that of GtkContainer::remove() in Unknown on line 0 GtkToolbar::set_style() takes an enum GtkToolbarStyle instead of a GtkStyle and thus overrides the GtkWidget::set_style(), not allowing access to this method. I think we should rename GtkToolbar::set_style() to set_toolbar_style(). The same is here: > GtkMenu::set_accel_path(accel_path); > GtkWidget::set_accel_path(accel_path, GtkAccelGroup accel_group); GtkMenu's accel path doesn't take the second parameter. We could either rename it to set_menu_accel_path() or make the second parameter optional, calling the GtkWidget method if the second parameter is given. > GtkWindow::mnemonic_activate(keyval, GdkModifierType modifier); > GtkWidget::mnemonic_activate(group_cycling); The GtkWindow one does activate the mnemonic given in the parameters, while the GtkWidget one just tells the widget that it has been activated by a mnemonic. So we could rename the GtkWidget method to mnemonic_activated() > GtkMenuItem::set_accel_path(accel_path); > GtkWidget::set_accel_path(accel_path, GtkAccelGroup accel_group); Same as for GtkMenu; I recommend to rename the method to set_menu_accel_path() > GtkStatusbar::remove(context_id, message_id); > GtkContainer::remove(GtkWidget widget); What to do here? Make message_id optional and the type of context_id switches between the container and the statusbar method? > GtkCList::remove(row); > GtkContainer::remove(GtkWidget widget); Same here. -- Regards/MfG, Christian Weiske

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.gtk.dev (#2850) next »