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