callbacks get the REQUEST, not the BINDINGS

This commit is contained in:
interp 2002-09-29 16:42:53 +00:00
parent aa7bcc6186
commit d6c4304f45
2 changed files with 6 additions and 7 deletions

View File

@ -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)))))

View File

@ -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)