From: Haris Bogdanovi� on
Why doesn't this piece of code work ?
------------------------------------------------------
(defun index ()
(with-html-output (*standard-output* nil)
(:html
(:head
(:title "Test page"))
(:body
(dotimes (x 10)
(:htm
(:p "Text"))))))
-----------------------------------------------------------
It says Internal server error (hunchentoot).
If I remove "(dotimes (x 10)" then it prints out "Text".


From: vanekl on
Haris Bogdanovi� wrote:
> Why doesn't this piece of code work ?
> ------------------------------------------------------
> (defun index ()
> (with-html-output (*standard-output* nil)
> (:html
> (:head
> (:title "Test page"))
> (:body
> (dotimes (x 10)
> (:htm
> (:p "Text"))))))
> -----------------------------------------------------------
> It says Internal server error (hunchentoot).
> If I remove "(dotimes (x 10)" then it prints out "Text"

this works as expected for me:

(cl-who:with-html-output-to-string (str)
(:html
(:head
(:title "Test page"))
(:body
(dotimes (x 10)
(cl-who:htm
(:p "Text")))))).


From: Haris Bogdanovi� on
> (cl-who:with-html-output-to-string (str)
> (:html
> (:head
> (:title "Test page"))
> (:body
> (dotimes (x 10)
> (cl-who:htm
> (:p "Text")))))).

If I try to evaluate this expression then I get:
"The variable LET is unbound."
Where is the problem now ?



From: Haris Bogdanovi� on
------------------------------------------------------
> (defun index ()
> (with-html-output (*standard-output* nil)
> (:html
> (:head
> (:title "Test page"))
> (:body
> (dotimes (x 10)
> (:htm
> (:p "Text"))))))
> -----------------------------------------------------------
Page source (firefox) from this code is just:
------------------------------
</body>
</html>
--------------------------------


From: Rob Warnock on
Haris Bogdanovi� <fbogdanovic(a)xnet.hr> wrote:
+---------------
| > (cl-who:with-html-output-to-string (str)
| > (:html
| > (:head
| > (:title "Test page"))
| > (:body
| > (dotimes (x 10)
| > (cl-who:htm
| > (:p "Text")))))).
|
| If I try to evaluate this expression then I get:
| "The variable LET is unbound." Where is the problem now ?
+---------------

Works for me:

> (cl-who:with-html-output-to-string (str)
(:html
(:head (:title "Test page"))
(:body
(dotimes (x 10)
(cl-who:htm (:p "Text"))))))

"<html><head><title>Test page</title></head><body><p>Text</p><p>Text</p><p>Text</p><p>Text</p><p>Text</p><p>Text</p><p>Text</p><p>Text</p><p>Text</p><p>Text</p></body></html>"
>


-Rob

-----
Rob Warnock <rpw3(a)rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607