Re: QuickFormController Privates? - Re: [PEAR-BUG] #60 [Asn]: varname error (and limitation)

From: Date: Mon, 06 Oct 2003 12:40:21 +0000
Subject: Re: QuickFormController Privates? - Re: [PEAR-BUG] #60 [Asn]: varname error (and limitation)
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22398@lists.php.net to get a copy of this message
Hi! Alan Knowles wrote:
Can someone that knows QF Controller explain this.. ?
Well, QFC does generate element names starting with underscore. This is done to higlight the fact that these are private and of no interest to anyone except Controller itself. But the "renderer" argument is sort of bogus: this only will bite when you use Static renderer, as you don't care about the elements' names when using the Dynamic one. I tried this out of curiosity, here is the wizard example from QFC using dynamic Flexy renderer as in QF's example: http://oc.cs.msu.su/pear/wizardFlexy.php I can change the names from _qf_* to qf_*, but this will not help the fact that when using the Static renderer you'll need to directly use the names that are auto-generated and may change in the future (as the change from _qf_* to qf_* will itself show). Oh, in case this Static/Dynamic thing isn't clear: Dynamic renderers basically iterate over elements, Static ones directly access elements by their names.
and I've not come up with any good reason _yet_ for changing it.. :)
One reason might be so you can use Flexy as a renderer for QuickFormController (without hacking around) .. :) It makes buttons that start with '_qf_'. The problem is that starting with a underscore does not always mean 'private', but is also used for namespace reasons ...


« previous php.pear.dev (#22398) next »