mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
update documentation, remove tabs
This commit is contained in:
parent
2c9ce0864f
commit
25a9462f1f
84 changed files with 2163 additions and 2278 deletions
|
|
@ -9,18 +9,18 @@
|
|||
;; example show a more practical example.
|
||||
(defun ask (obj)
|
||||
(let ((result nil)
|
||||
(hold (bordeaux-threads:make-semaphore))
|
||||
(q-box (create-div obj)))
|
||||
(hold (bordeaux-threads:make-semaphore))
|
||||
(q-box (create-div obj)))
|
||||
(set-on-click (create-button q-box :content "Yes")
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(setf result :yes)
|
||||
(bordeaux-threads:signal-semaphore hold)))
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(setf result :yes)
|
||||
(bordeaux-threads:signal-semaphore hold)))
|
||||
(set-on-click (create-button q-box :content "No")
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(setf result :no)
|
||||
(bordeaux-threads:signal-semaphore hold)))
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(setf result :no)
|
||||
(bordeaux-threads:signal-semaphore hold)))
|
||||
(bordeaux-threads:wait-on-semaphore hold :timeout 10)
|
||||
(destroy q-box)
|
||||
result))
|
||||
|
|
@ -31,23 +31,23 @@
|
|||
(clog-gui-initialize body)
|
||||
(setf (title (html-document body)) "Tutorial 23")
|
||||
(set-on-click (create-button body :content
|
||||
"Click for my question. You have 10 seconds to answer.")
|
||||
(lambda (obj)
|
||||
(setf (disabledp obj) t)
|
||||
;; ask returns once an answer is given or times out
|
||||
(create-div body :content (ask body))
|
||||
;; once ask returns with its answer (yes no or nil for timeout)
|
||||
;; the next statment is processed to open a dialog
|
||||
(let ((hold (bordeaux-threads:make-semaphore)))
|
||||
(confirm-dialog body "Are you sure?"
|
||||
(lambda (answer)
|
||||
(if answer
|
||||
(create-div body :content "Great!")
|
||||
(create-div body :content "Next time be sure!"))
|
||||
(bordeaux-threads:signal-semaphore hold)))
|
||||
(bordeaux-threads:wait-on-semaphore hold :timeout 60)
|
||||
(create-div body :content "Thank you for answering!")))
|
||||
:one-time t))
|
||||
"Click for my question. You have 10 seconds to answer.")
|
||||
(lambda (obj)
|
||||
(setf (disabledp obj) t)
|
||||
;; ask returns once an answer is given or times out
|
||||
(create-div body :content (ask body))
|
||||
;; once ask returns with its answer (yes no or nil for timeout)
|
||||
;; the next statment is processed to open a dialog
|
||||
(let ((hold (bordeaux-threads:make-semaphore)))
|
||||
(confirm-dialog body "Are you sure?"
|
||||
(lambda (answer)
|
||||
(if answer
|
||||
(create-div body :content "Great!")
|
||||
(create-div body :content "Next time be sure!"))
|
||||
(bordeaux-threads:signal-semaphore hold)))
|
||||
(bordeaux-threads:wait-on-semaphore hold :timeout 60)
|
||||
(create-div body :content "Thank you for answering!")))
|
||||
:one-time t))
|
||||
|
||||
(defun start-tutorial ()
|
||||
"Start turtorial."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue