doc improvements

This commit is contained in:
David Botton 2021-10-31 09:48:59 -04:00
parent 2b34ffee0d
commit 9cf531f61e

View file

@ -87,7 +87,8 @@ CL-USER> (load \"path to clog/demos/01-snake.lisp\")
CL-USER> (clog-user:start-demo)
```
To open a browser with the CLOG manual:
To open a browser with the CLOG manual (it is located
at clog/doc/clog-manual.html):
```
CL-USER> (clog:open-manual)
@ -107,7 +108,6 @@ needed for mastering CLOG.")
- You have installed CLOG and (ql:quickload :clog) is working for you.
* Simple REPL techniques Tutorial
We first need to load CLOG
@ -152,14 +152,6 @@ tutorials are a good place to start with make CLOG apps in code, so
here we are going to demonstrate the concepts using some REPL tricks
to help developing CLOG apps in general.
Since we already initialized CLOG let's use SET-ON-NEW-WINDOW to change our
on-new-window handler (handler is just a made up name for a function that
will handle an event).
```lisp
CLOG-USER> (set-on-new-window (lambda (body) (create-div body :content \"Hello World!\")))
```
(From here on, we will leave out the prompts and responses in our quotes of
code.)
@ -181,6 +173,16 @@ We can also set and respond to events and set properties etc:
(set-on-click tmp (lambda (obj)(setf (hiddenp tmp) t))))
```
Since we already initialized CLOG let's use SET-ON-NEW-WINDOW to change our
on-new-window handler (handler is just a made up name for a function that
will handle an event).
```lisp
CLOG-USER> (set-on-new-window (lambda (body) (create-div body :content \"Hello World!\")))
```
Now any new window opened will not be using CLOG REPL but instead will execute our handler.
Important take aways to using CLOG from the REPL:
1. You will need to pass to a global from the running system whatever you want to tinker