[hunchentoot-devel] How to pass define-easy-handler symbol?

Jeffrey Cunningham jeffrey at cunningham.net
Fri Jan 12 03:38:39 UTC 2007


This is probably a dumb question, but I haven't been able to figure it
out yet. Suppose I want to call 'DEFINE-EASY-HANDLER inside another
function and pass the symbol as an argument. I tried stuff like this:

(defun some-function (name)
  (define-easy-handler ((intern name) (concatenate 'string name ".html")
	 :default-request-type :post)
	((formarg :parameter-type :keyword)
  (html-generator name formarg)))

But it wants a real symbol.

Then I tried passing names as symbols and turning them into strings
where I needed. That works in the sense that it creates the page, but
each one is bound to the same symbol no matter what symbols I give it,
so only the last page created works.

Is there a way to do this?

Thanks for any help.

--Jeff




More information about the Tbnl-devel mailing list