adamc@613: sequence s adamc@613: sequence s2 adamc@613: adamc@613: fun dint src = n <- signal src; return <xml>{[n]}</xml> adamc@613: adamc@613: fun main () : transaction page = adamc@613: let adamc@613: fun getNext () = adamc@613: n <- nextval s; adamc@613: n2 <- nextval s2; adamc@613: return (n, n2) adamc@613: in adamc@613: src1 <- source 0; adamc@613: src2 <- source 0; adamc@613: return <xml><body> adamc@613: <button value="Get It On!" adamc@613: onclick={p <- getNext (); adamc@613: case p of adamc@613: (n1, n2) => set src1 n1; adamc@613: set src2 n2}/> adamc@613: <br/> adamc@613: Current1: <dyn signal={dint src1}/> adamc@613: Current2: <dyn signal={dint src2}/> adamc@613: </body></xml> adamc@613: end