[PEPr] Comment on Gtk2 Components::Gtk2_InputDialog
| From: | Scott Mattocks | Date: | Fri, 10 Mar 2006 14:48:39 +0000 |
| Subject: | [PEPr] Comment on Gtk2 Components::Gtk2_InputDialog | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41743@lists.php.net to get a copy of this message | ||
Scott Mattocks (http://pear.php.net/user/scottmattocks) has commented on the proposal for Gtk2
Components::Gtk2_InputDialog.
Comment:
I like this package. I have a few comments though:
- I think the name doesn't really reflect the nature of the dialog. I
think Gtk2_EntryDialog would be more descriptive.
- I know you are trying to stick with the PHP-GTK 2 method names but I
think you should have method aliases for some of the methods. For example,
I think set_default_response should have an alias that is more PEAR-ish:
setDefaultResponse(). It will help maintain consistency among PEAR
packages and make using the package less confusing for developers.
- In the get() method, you set $text = null; if the user cancels the
dialog. I think if the user clicks the OK button without putting a value
in the text entry, the value returned will be null. That can lead to some
confusing results. I think it is better to set the value to false if the
user cancels the dialog. It is not possible for the user to set the value
to a boolean false. That way I can run:
if (Gtk2_InputDialog::get(...) !== false) { ... }
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=366
--
Sent by PEPr, the automatic proposal system at http://pear.php.net