[hunchentoot-devel] Custom types for easy handler.
Edi Weitz
edi at agharta.de
Wed May 30 07:35:37 UTC 2007
Hi,
sorry for the delay.
On Fri, 25 May 2007 06:47:57 -0700 (PDT), Timothy Schaeffer <tschaef at sbcglobal.net> wrote:
> I propose that the types for easy-handlers be extensible by the
> users. I have pieces of markup which are used throughout our site
> which collect information from several fields into a class (in our
> case tied to a database with clsql). The names of the fields are
> related, but diffierent from the lists, arrays and hashes of the
> easy-handlers, Dates and addresses are two good examples, but there
> are others. I would like to be able to teach the easy handler to
> collect these for me and pass them as parameters. This cannot be
> done with functions as the :parameter-type because the functions
> passed as :parameter-type do not take the parameter name.
I don't really understand what you're trying to do that can't be done
with REAL-NAME and a function designator for PARAMETER-TYPE. Maybe
you can provide an example?
I'd say that if it can't be done, then your task is probably too
complicated for an "easy" handler, but maybe I'm missing something.
The idea of DEFINE-EASY-HANDLER is that it is a convenience macro for
90% of the handlers one usually writes - the mundane ones. It was not
intended as a general purpose tool for every conceivable Hunchentoot
handler on Earth.
> BTW: why the checks for null CDDRs and CDDDDRs in compute-parameter?
> Is this just nice, or are they essential?
It is there to check for syntax errors.
> Hunchentoot is a pleasure to work with!
That's good to know... :)
Cheers,
Edi.
More information about the Tbnl-devel
mailing list