From: Vladimir Sedach Date: Mon, 20 Aug 2007 21:08:58 +0000 (+0000) Subject: Updated the documentation and test suite to reflect the fact that html is now ps... X-Git-Tag: parenscript-20070828~18 X-Git-Url: https://git.hcoop.net/clinton/parenscript.git/commitdiff_plain/8bb28ead6855630f27fc89eb7256f772b8405451 Updated the documentation and test suite to reflect the fact that html is now ps-html and the ps-inline special form no longer exists. --- diff --git a/docs/reference.lisp b/docs/reference.lisp index 23d44cd..7c112f8 100644 --- a/docs/reference.lisp +++ b/docs/reference.lisp @@ -866,23 +866,23 @@ a-variable => aVariable ; (HTML html-expression) -;;; The HTML generator of ParenScript is very similar to the HTML -;;; generator included in AllegroServe. It accepts the same input -;;; forms as the AllegroServer HTML generator. However, non-HTML -;;; construct are compiled to JavaScript by the ParenScript +;;; The HTML generator of ParenScript is very similar to the htmlgen +;;; HTML generator library included with AllegroServe. It accepts the +;;; same input forms as the AllegroServer HTML generator. However, +;;; non-HTML construct are compiled to JavaScript by the ParenScript ;;; compiler. The resulting expression is a JavaScript expression. -(html ((:a :href "foobar") "blorg")) +(ps-html ((:a :href "foobar") "blorg")) => 'blorg' -(html ((:a :href (generate-a-link)) "blorg")) +(ps-html ((:a :href (generate-a-link)) "blorg")) => 'blorg' ;;; We can recursively call the JS compiler in a HTML expression. (document.write - (html ((:a :href "#" - :onclick (ps-inline (transport))) "link"))) + (ps-html ((:a :href "#" + :onclick (lisp (ps-inline (transport)))) "link"))) => document.write('link') ;;; Forms may be used in attribute lists to conditionally generate @@ -891,7 +891,7 @@ a-variable => aVariable (let ((disabled nil) (authorized t)) (setf element.inner-h-t-m-l - (html ((:textarea (or disabled (not authorized)) :disabled "disabled") + (ps-html ((:textarea (or disabled (not authorized)) :disabled "disabled") "Edit me")))) => var disabled = null; var authorized = true; @@ -909,7 +909,7 @@ a-variable => aVariable => 'color:red;font-size:x-small' (defun make-color-div(color-name) - (return (html ((:div :style (css-inline :color color-name)) + (return (ps-html ((:div :style (css-inline :color color-name)) color-name " looks like this.")))) => function makeColorDiv(colorName) { return '
' + colorName diff --git a/t/ps-tests.lisp b/t/ps-tests.lisp index 937a5f4..e5835df 100644 --- a/t/ps-tests.lisp +++ b/t/ps-tests.lisp @@ -77,11 +77,11 @@ x = 2 + sideEffect() + x + 5;") ;; A problem with long nested operator, when the statement spanned several rows ;; the rows would not be joined together correctly. (test-ps-js bug-dwim-join - (alert (html ((:div :id 777 - :style (css-inline :border "1pxsssssssssss" - :font-size "x-small" - :height (* 2 200) - :width (* 2 300)))))) + (alert (ps-html ((:div :id 777 + :style (css-inline :border "1pxsssssssssss" + :font-size "x-small" + :height (* 2 200) + :width (* 2 300)))))) "alert('
blorg'") (test-ps-js the-html-generator-2 - (html ((:a :href (generate-a-link)) "blorg")) + (ps-html ((:a :href (generate-a-link)) "blorg")) "'blorg'") (test-ps-js the-html-generator-3 (document.write - (html ((:a :href "#" - :onclick (ps-inline (transport))) "link"))) + (ps-html ((:a :href "#" + :onclick (lisp (ps-inline (transport)))) "link"))) "document.write('link')") (test-ps-js the-html-generator-4 (let ((disabled nil) (authorized t)) (setf element.inner-h-t-m-l - (html ((:textarea (or disabled (not authorized)) :disabled "disabled") + (ps-html ((:textarea (or disabled (not authorized)) :disabled "disabled") "Edit me")))) " var disabled = null; var authorized = true; @@ -476,7 +476,7 @@ x = a + b + c;") (test-ps-js the-html-generator-6 (defun make-color-div(color-name) - (return (html ((:div :style (css-inline :color color-name)) + (return (ps-html ((:div :style (css-inline :color color-name)) color-name " looks like this.")))) "function makeColorDiv(colorName) { return '
' + colorName