mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-12 05:30:27 -08:00
Add example.
This commit is contained in:
parent
2337caf13c
commit
7232f73458
1 changed files with 25 additions and 0 deletions
25
README.md
25
README.md
|
|
@ -18,6 +18,31 @@ To load this package and use the tests:
|
||||||
3. In the REPL run (ql:quickload :clog)
|
3. In the REPL run (ql:quickload :clog)
|
||||||
4. Then (load "~/common-lisp/clog/test/test-clog.lisp) (clog-test:test)
|
4. Then (load "~/common-lisp/clog/test/test-clog.lisp) (clog-test:test)
|
||||||
|
|
||||||
|
Sample CLOG app with code base so far:
|
||||||
|
|
||||||
|
```
|
||||||
|
(defpackage #:test-clog
|
||||||
|
(:use #:cl #:clog)
|
||||||
|
(:export test))
|
||||||
|
|
||||||
|
(in-package :test-clog)
|
||||||
|
|
||||||
|
(defvar *last-obj*)
|
||||||
|
|
||||||
|
(defun on-new-window (win)
|
||||||
|
(create-child win "<button>test</botton>")
|
||||||
|
(create-child win "<H2>Cool!</H2>")
|
||||||
|
(setf *last-obj* (create-child win "<button>a</button>")))
|
||||||
|
|
||||||
|
(defun test ()
|
||||||
|
(print "Init connection")
|
||||||
|
(initialize #'on-new-window :boot-file "/debug.html")
|
||||||
|
(print "Connection set")
|
||||||
|
(print "Open browser")
|
||||||
|
(open-browser))
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Status:
|
Status:
|
||||||
|
|
||||||
- Connection methods
|
- Connection methods
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue