Mercurial > urweb
comparison tests/rpc2.ur @ 613:c5991cdb0c4b
Initial parsing of RPC results
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 15 Feb 2009 12:33:41 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
612:d80256efc160 | 613:c5991cdb0c4b |
---|---|
1 sequence s | |
2 sequence s2 | |
3 | |
4 fun dint src = n <- signal src; return <xml>{[n]}</xml> | |
5 | |
6 fun main () : transaction page = | |
7 let | |
8 fun getNext () = | |
9 n <- nextval s; | |
10 n2 <- nextval s2; | |
11 return (n, n2) | |
12 in | |
13 src1 <- source 0; | |
14 src2 <- source 0; | |
15 return <xml><body> | |
16 <button value="Get It On!" | |
17 onclick={p <- getNext (); | |
18 case p of | |
19 (n1, n2) => set src1 n1; | |
20 set src2 n2}/> | |
21 <br/> | |
22 Current1: <dyn signal={dint src1}/> | |
23 Current2: <dyn signal={dint src2}/> | |
24 </body></xml> | |
25 end |