diff --git a/README.md b/README.md index a02ed36..4b3656a 100644 --- a/README.md +++ b/README.md @@ -171,11 +171,7 @@ Here is a sample CLOG app: (set-on-click hello-element ; Now we set a function to handle clicks (lambda (obj) ; In this case we use an anonymous function - (setf (color hello-element) "green"))) - - (run body))) ; Keep our thread alive until connection closes - ; and prevent garbage collection of our CLOG-Objects - ; until no longer needed. + (setf (color hello-element) "green")))))) ;; To see all the events one can set and the many properties and styles that ;; exist, refer to the CLOG manual or the file clog-element.lisp diff --git a/demos/03-demo.lisp b/demos/03-demo.lisp index 0c91b39..fc058d3 100644 --- a/demos/03-demo.lisp +++ b/demos/03-demo.lisp @@ -210,8 +210,7 @@ (set-on-before-unload (window body) (lambda(obj) (declare (ignore obj)) ;; return empty string to prevent nav off page - "")) - (run body)) + ""))) (defun start-demo () "Start demo." diff --git a/demos/04-demo.lisp b/demos/04-demo.lisp index 2d72d9a..44c087c 100644 --- a/demos/04-demo.lisp +++ b/demos/04-demo.lisp @@ -171,8 +171,7 @@ (clog-web-initialize body) (create-web-frame body app) (reset-menu app) - (route-content app "Home") - (run body))) + (route-content app "Home"))) (defun start-demo () "Start dynamic website demo." diff --git a/doc/clog-manual.html b/doc/clog-manual.html index 92e594e..cb189c6 100644 --- a/doc/clog-manual.html +++ b/doc/clog-manual.html @@ -4027,7 +4027,7 @@ CLOG-Builder. If not using builder use to connect:

@@ -4038,7 +4038,31 @@ CLOG-Builder. If not using builder use to connect: + +

+

+ + + +

+

+ +

@@ -4047,15 +4071,18 @@ CLOG-Builder. If not using builder use to connect:

@@ -4114,26 +4141,33 @@ must be a parent to CLOG-One-Row.

  • [generic-function] LAST-FETCH OBJECT
  • +

    +

    + + +

    @@ -4141,10 +4175,10 @@ be set using

    @@ -4152,21 +4186,21 @@ using

    @@ -4175,7 +4209,7 @@ on panel will be retrieved from PANEL using

    ") - (run body)) + ")) (defun on-page1 (body) - (create-div body :content "You are in on-page1") - (run body)) + (create-div body :content "You are in on-page1")) (defun on-page2 (body) (create-div body :content "You are in on-page2") - (log-console (window body) "A message in the browser's log") - (run body)) + (log-console (window body) "A message in the browser's log")) (defun on-default (body) (cond ((equalp (path-name (location body)) "/tutorial/tut-11.html") (on-tutorial11 body)) (t - (create-div body :content "No dice!") - (run body)))) + (create-div body :content "No dice!")))) (defun on-tutorial11 (body) (let* ((form (attach-as-child body "form1" :clog-type 'clog-form)) @@ -82,8 +78,7 @@ ;; We need to override the boostrap default to submit the form html style (set-on-submit form (lambda (obj)(declare (ignore obj))())) (set-on-click good-button 'on-click-good) - (set-on-click scary-button 'on-click-scary)) - (run body))) + (set-on-click scary-button 'on-click-scary)))) (defun start-tutorial () "Start turtorial." diff --git a/tutorial/13-tutorial/hello-clog/hello-clog.lisp b/tutorial/13-tutorial/hello-clog/hello-clog.lisp index 8161a46..c58adcf 100644 --- a/tutorial/13-tutorial/hello-clog/hello-clog.lisp +++ b/tutorial/13-tutorial/hello-clog/hello-clog.lisp @@ -5,8 +5,7 @@ (in-package :hello-clog) (defun on-new-window (body) - (create-div body :content "Hello World!") - (run body)) + (create-div body :content "Hello World!")) (defun start-app () (initialize 'on-new-window diff --git a/tutorial/14-tutorial.lisp b/tutorial/14-tutorial.lisp index 8b9d55f..a9dc0f2 100644 --- a/tutorial/14-tutorial.lisp +++ b/tutorial/14-tutorial.lisp @@ -49,8 +49,7 @@ Changes made to a local key will fire an event and print below:
    " "my-local-key" (storage-element (window body) :local "my-local-key") "my-session-key" - (storage-element (window body) :session "my-session-key"))) - (run body)) + (storage-element (window body) :session "my-session-key")))) (defun start-tutorial () "Start turtorial." diff --git a/tutorial/15-tutorial.lisp b/tutorial/15-tutorial.lisp index 6645353..5f9a60f 100644 --- a/tutorial/15-tutorial.lisp +++ b/tutorial/15-tutorial.lisp @@ -24,8 +24,7 @@ (set-on-click vst (lambda (obj)(declare (ignore obj))(pause-media vid))) (set-on-click ast (lambda (obj)(declare (ignore obj))(pause-media aud))) (set-on-time-update vid (lambda (obj)(declare (ignore obj))(setf (value vlc) (media-position vid)))) - (set-on-time-update aud (lambda (obj)(declare (ignore obj))(setf (value alc) (media-position aud)))) - (run body))) + (set-on-time-update aud (lambda (obj)(declare (ignore obj))(setf (value alc) (media-position aud)))))) (defun start-tutorial () "Start turtorial." diff --git a/tutorial/16-tutorial.lisp b/tutorial/16-tutorial.lisp index 498a02e..d90916d 100644 --- a/tutorial/16-tutorial.lisp +++ b/tutorial/16-tutorial.lisp @@ -51,8 +51,7 @@ (setf (attribute alert "role") "alert") (setf (attribute btn "data-dismiss") "alert") (place-after nav alert)))) - (set-on-click l3 (lambda (obj)(declare (ignore obj))(setf (color jname) (rgb 128 128 0))))) - (run body)) + (set-on-click l3 (lambda (obj)(declare (ignore obj))(setf (color jname) (rgb 128 128 0)))))) (defun on-page2 (body) ;; Since page2 is a new browser page we need to reload our bootstrap files. @@ -70,8 +69,7 @@ ;; Jumbotron (jumbo (create-div body :class "jumbotron text-center")) (jname (create-section jumbo :h1 :content "You found Page2"))) - (declare (ignore l1) (ignore l2) (ignore l3) (ignore l4) (ignore jname))) - (run body)) + (declare (ignore l1) (ignore l2) (ignore l3) (ignore l4) (ignore jname)))) (defun start-tutorial () "Start turtorial." diff --git a/tutorial/17-tutorial.lisp b/tutorial/17-tutorial.lisp index ccb182f..28d0a7c 100644 --- a/tutorial/17-tutorial.lisp +++ b/tutorial/17-tutorial.lisp @@ -76,22 +76,19 @@ (create-div body :content (format nil "yourname3 = using NAME-VALUE ~A or VALUE ~A" (name-value form3 "yourname3") - (value finput3))))))) - (run body)) + (value finput3)))))))) (defun on-page2 (body) (let ((params (form-post-data body))) (create-div body :content params) (create-div body :content (format nil "yourname = ~A" - (form-data-item params "yourname")))) - (run body)) + (form-data-item params "yourname"))))) (defun on-page3 (body) (let ((params (form-get-data body))) (create-div body :content params) (create-div body :content (format nil "yourname = ~A" - (form-data-item params "yourname")))) - (run body)) + (form-data-item params "yourname"))))) (defun on-page4 (body) (let ((params (form-multipart-data body))) @@ -105,8 +102,7 @@ (let ((c (read-sequence b s))) (unless (plusp c) (return)) (princ (subseq b 1 c)))))) - (delete-multipart-data body)) - (run body)) + (delete-multipart-data body))) (defun start-tutorial () "Start tutorial." diff --git a/tutorial/18-tutorial.lisp b/tutorial/18-tutorial.lisp index 2522a65..7f9f721 100644 --- a/tutorial/18-tutorial.lisp +++ b/tutorial/18-tutorial.lisp @@ -52,8 +52,7 @@ (set-on-drop target2 (lambda (obj data) (declare (ignore obj)) (print (getf data :drag-data)) - (place-inside-bottom-of target2 object))) - (run body))) + (place-inside-bottom-of target2 object))))) (defun start-tutorial () "Start tutorial." diff --git a/tutorial/19-tutorial.lisp b/tutorial/19-tutorial.lisp index 71314e8..e0b3837 100644 --- a/tutorial/19-tutorial.lisp +++ b/tutorial/19-tutorial.lisp @@ -24,8 +24,7 @@ (item (create-list-item list-b :content "Item 4"))) (declare (ignore item)) (js-execute body (format nil "JSLists.applyToList('~A', 'ALL');" - (html-id list-top)))) - (run body)) + (html-id list-top))))) (defun start-tutorial () "Start tutorial." diff --git a/tutorial/20-tutorial.lisp b/tutorial/20-tutorial.lisp index 3067686..4415aa3 100644 --- a/tutorial/20-tutorial.lisp +++ b/tutorial/20-tutorial.lisp @@ -66,8 +66,7 @@ (item (create-list-item list-b :content "Item 3")) (item (create-list-item list-b :content "Item 4"))) (declare (ignore item)) - (clog-toggler:activate toggler)) - (run body)) + (clog-toggler:activate toggler))) (defun start-tutorial () "Start tutorial." diff --git a/tutorial/21-tutorial.lisp b/tutorial/21-tutorial.lisp index 97a4072..2a9e3cd 100644 --- a/tutorial/21-tutorial.lisp +++ b/tutorial/21-tutorial.lisp @@ -54,8 +54,7 @@ on the drop-root.")) (item (create-list-item (clog-drop-list:drop-root drop-list) :content "Item 2")) (item (create-list-item (clog-drop-list:drop-root drop-list) :content "Item 3")) (item (create-list-item (clog-drop-list:drop-root drop-list) :content "Item 4"))) - (declare (ignore item))) - (run body)) + (declare (ignore item)))) (defun start-tutorial () "Start tutorial." diff --git a/tutorial/22-tutorial.lisp b/tutorial/22-tutorial.lisp index a5035bd..0514d29 100644 --- a/tutorial/22-tutorial.lisp +++ b/tutorial/22-tutorial.lisp @@ -153,8 +153,7 @@ (set-on-before-unload (window body) (lambda(obj) (declare (ignore obj)) ;; return empty string to prevent nav off page - "")) - (run body)) + ""))) (defun start-tutorial () "Start turtorial." diff --git a/tutorial/23-tutorial.lisp b/tutorial/23-tutorial.lisp index c352189..6d4bddc 100644 --- a/tutorial/23-tutorial.lisp +++ b/tutorial/23-tutorial.lisp @@ -47,8 +47,7 @@ (bordeaux-threads:signal-semaphore hold))) (bordeaux-threads:wait-on-semaphore hold :timeout 60) (create-div body :content "Thank you for answering!"))) - :one-time t) - (run body)) + :one-time t)) (defun start-tutorial () "Start turtorial." diff --git a/tutorial/24-tutorial.lisp b/tutorial/24-tutorial.lisp index f224a49..e3590dd 100644 --- a/tutorial/24-tutorial.lisp +++ b/tutorial/24-tutorial.lisp @@ -99,8 +99,7 @@ (defun start-tutorial ()
    \"Start turtorial.\"
    (initialize 'on-new-window)
    - (open-browser))") - (run body))) + (open-browser))"))) (defun start-tutorial () "Start turtorial." diff --git a/tutorial/25-tutorial.lisp b/tutorial/25-tutorial.lisp index 9de4ab2..3255be9 100644 --- a/tutorial/25-tutorial.lisp +++ b/tutorial/25-tutorial.lisp @@ -61,8 +61,7 @@ (set-height) (set-on-resize (window body) (lambda (obj) (declare (ignore obj)) - (set-height))))) - (run body)) + (set-height)))))) (defun start-tutorial () "Start turtorial." diff --git a/tutorial/26-tutorial.lisp b/tutorial/26-tutorial.lisp index d0a020f..f611af8 100644 --- a/tutorial/26-tutorial.lisp +++ b/tutorial/26-tutorial.lisp @@ -93,8 +93,7 @@ :class "w3-text-white w3-xlarge"))) (setf (text-shadow txt) "2px 2px black") (composite-right txt :padding-class :padding-64) - (setf (box-width image) "100%")) - (run body)) + (setf (box-width image) "100%"))) (defun start-tutorial () "Start turtorial." diff --git a/tutorial/27-tutorial.lisp b/tutorial/27-tutorial.lisp index de86369..85f9da5 100644 --- a/tutorial/27-tutorial.lisp +++ b/tutorial/27-tutorial.lisp @@ -34,8 +34,7 @@ (setf (url-src viewer) (format nil "/img/~A" (value lbox))))) ;; Setup Bottom - (center-children (bottom-panel console) :horizontal nil) - (run body))) + (center-children (bottom-panel console) :horizontal nil))) (defun start-tutorial () (initialize 'on-new-window)