mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
Tutorial 4 updates
This commit is contained in:
parent
34971a7c90
commit
6d8467caf4
2 changed files with 7 additions and 3 deletions
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
(in-package :clog-user)
|
||||
|
||||
(defun my-on-click (obj)
|
||||
(setf (color obj) "green"))
|
||||
(defun my-on-click (obj) ; obj in any event is the target of the event
|
||||
(setf (color obj) "green")) ; this makes it possible to reuse events
|
||||
|
||||
(defun on-new-window (body)
|
||||
"On-new-window handler."
|
||||
|
|
@ -13,6 +13,9 @@
|
|||
(setf (title (html-document body)) "Tutorial 4")
|
||||
|
||||
(set-on-click (create-child body "<h1>Hello World! (click me!)</h1>")
|
||||
#'my-on-click)
|
||||
|
||||
(set-on-click (create-child body "<h3>Click me too!</h3>")
|
||||
#'my-on-click))
|
||||
|
||||
(defun start-tutorial ()
|
||||
|
|
|
|||
|
|
@ -36,4 +36,5 @@ Tutorial Summary
|
|||
01-tutorial.lisp - Hello World
|
||||
02-tutorial.lisp - Closures in CLOG
|
||||
03-tutorial.lisp - Events fire in parallel
|
||||
|
||||
05-tutorial.lisp - The event target, reusing event handlers
|
||||
05-tutorial.lisp - Using connection-data-item
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue