Hi,
On Sun, 22 Apr 2007 21:15:09 +0300, Volkan YAZICI yazicivo@ttnet.net.tr wrote:
I really like the way DEFINE-EASY-HANDLER works with supplied form field parameters. But the problem with it is, IMHO, that you cannot use DEFINE-EASY-HANDLER everywhere in the code when you want to reach to a form variable. Therefore I come up with such a solution:
(let ((default-parameter-type ''string) (default-request-type :both)) (defmacro with-form-fields ((&rest fields) &body body) `(let ,(loop for field in fields collect (hunchentoot::make-defun-parameter field default-parameter-type default-request-type)) ,@body)))
I couldn't be sure if using an unexported function is the right way to go here, therefore I'm here for your help. Is there any other function provided by hunchentoot to have the same effect as WITH-FORM-FIELDS?
No, not really. You could of course cook up something yourself but it'd be kind of re-inventing the wheel.
If there isn't any, maybe others too would be happy to see this function coming default with hunchentoot.
Yes, I think that makes sense. I'll add something like this to the next release.
Thanks, Edi.