Re: [PEPr] +1 for HTML::HTML_QuickForm_SelectFilter
| From: | Nicolas Hoizey | Date: | Fri, 03 Dec 2004 11:39:51 +0000 |
| Subject: | Re: [PEPr] +1 for HTML::HTML_QuickForm_SelectFilter | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34753@lists.php.net to get a copy of this message | ||
Hello,
This kind of error handling in toHtml() does not seem like a good idea:
function toHtml()
{
if (count($this->_targets) == 0) {
// this filter as no target!
return 'No target defined!';
I was not sure how to consider this. Is it an error?
Maybe the right thing would be to return an empty string.
You can also help users by automatically registering (using HTML_QuickForm::registerElementType()) the element type on class include.If this element is added to HTML_QuickForm, I think it will be registered in HTML_QuickForm constructor. -Nicolas -- Nicolas "Brush" HOIZEY Clever Age : http://www.clever-age.com/ Gastero Prod : http://www.gasteroprod.com/ phpMyChat : http://phpmychat.sf.net/