Commit 570378a5 authored by Rinus Plasmeijer's avatar Rinus Plasmeijer
Browse files

*** empty log message ***

parent c8c1df20
......@@ -211,7 +211,7 @@ readStringState directory filename env
# (string,file) = freads file big
| not ok = ("",env)
# (ok,env) = fclose file env
# string = mkString (removeBackslashQuote (mkList string))
//# string = mkString (removeBackslashQuote (mkList string)) // ?? STILL NEEDED ??
= (string,env)
where
big = 100000
......
......@@ -8,7 +8,8 @@ derive gForm []
derive gUpd []
//Start world = doHtmlServer (multiUser (Quotation myQuotation)) world
Start world = doHtmlServer (multiUser testTime) world
//Start world = doHtmlServer (multiUser twotasks3) world
Start world = doHtmlServer (multiUser agenda2) world
where
singleUser tasks hst
# (_,html,hst) = startTask 0 tasks hst
......@@ -160,17 +161,18 @@ where
agenda` date tst
# (date,tst) = STask "SetDate" date tst
# (who,tst) = STask "AskPerson" (PullDown (1,100) (0,[toString i \\ i <- [0..5]])) tst
# ((ok,date),tst) = ((toInt (toString who),"Meeting required") @: handle date) tst
# ((ok,date),tst) = ((toInt (toString who),"Meeting Request") @: handle date) tst
| ok = returnTask date tst
# tst = returnF [Txt ("No, but can we meet on the " <+++ date <+++ "?"),Br] tst
# (ok,tst) = CTask_button [("Accept",returnV True),("Sorry",returnV False)] tst
| ok = returnV date tst
= mkTask (agenda` date) tst
where
handle date tst
# tst = returnF [Txt ("Can you meet on " <+++ date <+++ "?"),Br] tst
# tst = returnF [Txt ("Can we meet on the " <+++ date <+++ "?"),Br] tst
# (ok,tst) = CTask_button [("Accept",returnV True),("Sorry",returnV False)] tst
| ok = returnV (ok,date) tst
# (date,tst) = STask "SetDate" date tst
# (date,tst) = STask "AlternativeDate" date tst
= returnV (ok,date) tst
//agenda :: (Task Bool)
......
......@@ -270,7 +270,13 @@ where
= (a,{tst & html = html +|+ BT bodytag})
returnF :: [BodyTag] -> TSt -> TSt
returnF bodytag = \tst=:{html} = {tst & html = html +|+ BT bodytag}
returnF bodytag = \tst = returnVF` tst
where
returnVF` tst=:{activated, html}
| not activated = tst // not active, return default value
= {tst & html = html +|+ BT bodytag} // active, so perform task or get its result
mkRTask :: String (Task a) *TSt -> ((Task a,Task a),*TSt) | iData a
mkRTask s task tst = let (a,b,c) = mkRTask` s task (incTask tst) in ((a,b),c)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment