Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gendl
tutorials
Commits
481b3019
Commit
481b3019
authored
Jul 21, 2020
by
Dave Cooper
Browse files
adding multiple presidents
parent
6d893a8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
0 → 100755
View file @
481b3019
*.wx64fsl
*~
#*#
\ No newline at end of file
source/presidents.lisp
View file @
481b3019
(
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"
)))
((
president
s
: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
))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment