Commit 481b3019 authored by Dave Cooper's avatar Dave Cooper
Browse files

adding multiple presidents

parent 6d893a8b
*.wx64fsl
*~
#*#
\ No newline at end of file
(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)
:input-slots
((table-border 1)
(data '((:name "Carter" :term 1976)
(:name "Reagan" :term 1980)
(:name "Bush" :term 1988)
(:name "Clinton" :term 1992)
(:name "Bush Jr" :term 2000)
(:name "Obama" :term 2008)
(:name "Trump" :term 2016))))
:computed-slots
((main-sheet-body
(with-cl-who-string ()
(str (the development-links))
(str (the president main-sheet-body)))))
((:table :border (the table-border))
(dolist (president (list-elements (the presidents)))
(htm (:tr (:td ((:a :href (the-object president url))(str (the-object president name))))
(:td (str (the-object president term))))))))))
:objects
((president :type 'president
:name "Nixon")))
((presidents :type 'president
:sequence (:size (length (the data)))
:parameters (nth (the-child index) (the data)))))
(define-object president (base-ajax-sheet)
:input-slots
((name "Carter") (term 1976) (table-border 1))
((name "Carter") (term 1976))
:computed-slots
((main-sheet-body
(with-cl-who-string ()
(:p (str (the name-input html-string)))
(:p (str (the term-input html-string)))
(str (the name-input html-string))
(str (the main-sheet-section main-div)))))
:objects
......@@ -64,10 +52,13 @@
(: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))))
:default (the name))
(term-input :type 'number-form-control
:ajax-submit-on-change? t
:default (the term))))
......
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