Mercurial > urweb
diff tests/chat.ur @ 680:54ec237a3028
Marshalcheck
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 28 Mar 2009 11:13:36 -0400 |
parents | 44f23712020d |
children | 5bbb542243e8 |
line wrap: on
line diff
--- a/tests/chat.ur Thu Mar 26 18:26:50 2009 -0400 +++ b/tests/chat.ur Sat Mar 28 11:13:36 2009 -0400 @@ -25,7 +25,15 @@ logTail <- source logHead; let - fun join () = subscribe ch + fun getCh () = + r <- oneRow (SELECT t.Chan FROM t WHERE t.Id = {[id]}); + case r.T.Chan of + None => error <xml>Channel disappeared</xml> + | Some ch => return ch + + fun join () = + ch <- getCh (); + subscribe ch fun onload () = let @@ -42,6 +50,7 @@ end fun speak line = + ch <- getCh (); send ch line fun doSpeak () =