Re: [PEPr] +1 for Structures::Structures_Form
| From: | Scott Mattocks | Date: | Mon, 17 Apr 2006 13:25:25 +0000 |
| Subject: | Re: [PEPr] +1 for Structures::Structures_Form | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42265@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
Justin Patrin (http://pear.php.net/user/justinpatrin) has voted +1 on the proposal for Structures::Structures_Form. This vote is conditional. The condition is: I'm not sure I like adding a mandatory requirement on reflection. How prevalent is reflection in peoples' installs? Could it be done using an assoc array perhaps instead of constructor params?Reflection is enabled by default. Has anyone turned it off?
It seems like the API here doesn't allow for recursive elements. It would be nice to have groups be just another element type which happens to hold other elements. It looks like the setValues() implementation makes this far less extendable than HTML_QuickForm. As far as I can see only element names which are arrays would work in sub-elements. See the element types I've added to FormBuilder for the types that I'd like to be able to create (subForm and elementTable).I'll take a look. What about the current group implementation seems limiting? The example uses a simple group to organize the authentication information.
Use a static private for the errors rather than a global. Or use a static within a function to hide it from, say, print_r.I have no problem with this, but it seems inconsistent with other PEAR classes.
Support for constant element values, as in QuickForm, would be nice.I think this can easily be done by adding a setConstant method to the interface. Then an element base class (or individual elements for Gtk2 stuff) can check a flag in the setValue method.
I don't understand quite why you're using class constants for the names of the interfaces and file names. I suggest using just the strings.To allow other classes to access the names and paths if needed. Probably not entirely necessary. I can change it.
There may be other things as well, but I don't have time to look closer right now, this is a very large package.Yes it is. If anyone wants to lend a hand, I'd be more than happy to have the help. Thanks, -- Scott Mattocks Author of the soon to be published: Pro PHP-GTK http://www.crisscott.com