callbacks get the REQUEST, not the BINDINGS
This commit is contained in:
parent
aa7bcc6186
commit
d6c4304f45
|
@ -157,9 +157,8 @@
|
||||||
(call-with-current-continuation
|
(call-with-current-continuation
|
||||||
(lambda (exit)
|
(lambda (exit)
|
||||||
(let* ((req (send/suspend (lambda (new-url)
|
(let* ((req (send/suspend (lambda (new-url)
|
||||||
(exit new-url))))
|
(exit new-url)))))
|
||||||
(bindings (form-query (http-url:search (request:url req)))))
|
(function req)))))
|
||||||
(function bindings)))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
|
|
||||||
(define change-operator-callback
|
(define change-operator-callback
|
||||||
(make-callback
|
(make-callback
|
||||||
(lambda (bindings)
|
(lambda (req)
|
||||||
(change-operator
|
(change-operator
|
||||||
(input-field-value operator-input-field
|
(input-field-value operator-input-field
|
||||||
bindings)))))
|
(get-bindings req))))))
|
||||||
|
|
||||||
(define (show-page operator-pair)
|
(define (show-page operator-pair)
|
||||||
(send-html
|
(send-html
|
||||||
|
@ -47,8 +47,8 @@
|
||||||
(title "Simple calculator")
|
(title "Simple calculator")
|
||||||
(body (h1 "Simple calculator")
|
(body (h1 "Simple calculator")
|
||||||
(servlet-form
|
(servlet-form
|
||||||
,(make-callback (lambda (bindings)
|
,(make-callback (lambda (req)
|
||||||
(calculate operator-pair bindings)))
|
(calculate operator-pair (get-bindings req))))
|
||||||
(table
|
(table
|
||||||
(tr (td "Do calculation:"))
|
(tr (td "Do calculation:"))
|
||||||
(tr (td ,number-field1)
|
(tr (td ,number-field1)
|
||||||
|
|
Loading…
Reference in New Issue