Commit 6d893a8b authored by Dave Cooper's avatar Dave Cooper
Browse files

after session 2

parent fcb9bd6f
(in-package :gdl-user)
(defun try (&key (temperature-f 80))
(* (- temperature-f 32) 5/9))
(define-object try ()
:input-slots
((temperature-f 80 :settable)
)
:computed-slots
((temperature-c (progn
(format t "computing value...~%")
(* (- (the temperature-f) 32) 5/9))))
:objects
()
:functions
())
(in-package :gwl-user)
(define-object presidents (base-ajax-sheet)
:computed-slots
((main-sheet-body
(with-cl-who-string ()
(str (the development-links))
(str (the president main-sheet-body)))))
:objects
((president :type 'president
:name "Nixon")))
(define-object president (base-ajax-sheet)
:input-slots
((name "Carter") (term 1976) (table-border 1))
:computed-slots
((main-sheet-body
(with-cl-who-string ()
(str (the name-input html-string))
(str (the main-sheet-section main-div)))))
:objects
((main-sheet-section :type 'sheet-section
:inner-html
(with-cl-who-string ()
((:table :border (the table-border))
(:tr (:th "Name") (:th "Term"))
(:tr (:td (str (the name-input value)))
(:td (str (the term)))))))
(name-input :type 'text-form-control
:ajax-submit-on-change? t
:default (the name))))
(publish-gwl-app "/pres" 'presidents)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment