<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
However, I still don't get the results I'd like to see.<br>
Given the add.scm below, I see following behaviour in my debug log:<br>
<br>
Welcome to MzScheme version 360, Copyright (c) 2004-2006 PLT Schem<br>
> (require (planet "hwiki.scm" ("oesterholt" "hwiki.plt" 1 0)))<br>
> (hwiki)<br>
Warning: No rewrite rules defined.<br>
Servlet will be available through '/servlets/hwiki.scm/<page.html><br>
<br>
PostgreSQL connectionstring: host=pegasus dbname=test user=hans<br>
copy-to: C:\Documents and Settings\hdijkema\Application Data\PLT S<br>
wiki.scm<br>
Web server started on port 80<br>
Visit URL <a class="moz-txt-link-freetext" href="http://localhost:80/servlets/hwiki.scm">http://localhost:80/servlets/hwiki.scm</a><br>
Type stop to stop the server and exit<br>
Type restart to restart the server<br>
add-timer: ID=1 30000<br>
revise-timer!: ID=1 30000<br>
revise-timer!: ID=1 86400000<br>
add-timer: ID=2 86400000<br>
revise-timer!: ID=2 172800000.0<br>
revise-timer!: ID=2 172800000.0<br>
<font color="#3333ff"><b>1<br>
adjust-timeout! 1 180<br>
</b><b>add-timer: ID=3 30000<br>
revise-timer!: ID=3 259200000.0<br>
revise-timer!: ID=3 180000<br>
ALARM: id=3<br>
<br>
<i>This is after 30 seconds, not after 180!</i><br>
<br>
</b></font>add-timer: ID=4 0<br>
ALARM: id=4<br>
revise-timer!: ID=4 30000<br>
revise-timer!: ID=4 86400000<br>
revise-timer!: ID=4 86547143.0<br>
revise-timer!: ID=4 172947143.0<br>
revise-timer!: ID=4 172947143.0<br>
revise-timer!: ID=4 27146.0<br>
revise-timer!: ID=4 259347143.0<br>
<br>
<tt>(require (lib "unitsig.ss")<br>
(lib "servlet-sig.ss" "web-server")<br>
(lib "date.ss"))<br>
<br>
(unit/sig () (import servlet^)<br>
<br>
; request-number : str -> num<br>
(define (request-number which-number)<br>
(string->number<br>
(extract-binding/single<br>
'number<br>
(request-bindings (send/suspend (build-request-page
which-number))))))<br>
<br>
; build-request-page : str -> str -> response<br>
(define (build-request-page which-number)<br>
(lambda (k-url)<br>
<font color="#3333ff"> (adjust-timeout! 180)<br>
</font> `(html (head (title "Enter a Number to Add"))<br>
(body ([bgcolor "white"])<br>
(form ([action ,k-url] [method "post"])<br>
"Enter the " ,which-number " number to add: "<br>
(input ([type "text"] [name "number"] [value
""]))<br>
(input ([type "submit"] [name "enter"] [value
"Enter"])))))))<br>
<br>
<br>
`(html (head (title "Sum"))<br>
(body ([bgcolor "white"])<br>
(p "The sum is "<br>
,(number->string (+ (request-number "first")
(request-number "second")))))))<br>
</tt><br>
<br>
<br>
Matt Jadud schreef:
<blockquote
cite="mid:cf093f420706290223x7ffa312q3a6ed87b7955edae@mail.gmail.com"
type="cite">I usually find that I answer most of my questions after
asking them on
<br>
the list. It's good to see others using the list for the same
<br>
purpose... asking a question, answering it themselves, and then having
<br>
the same forehead-slapping revelations that I do... :D
<br>
<br>
Cheers,
<br>
M
<br>
<br>
On 6/29/07, Hans Oesterholt-Dijkema <a class="moz-txt-link-rfc2396E" href="mailto:hdnews@gawab.com"><hdnews@gawab.com></a> wrote:
<br>
<blockquote type="cite"><br>
I'm such a birdbrain,
<br>
adjust-timeout! has to be in the function given to send/supend of
course!
<br>
Thanks anyway!
<br>
</blockquote>
<br>
<br>
</blockquote>
</body>
</html>