diff options
-rw-r--r-- | demo/batch.ur | 6 | ||||
-rw-r--r-- | demo/batchG.ur | 16 | ||||
-rw-r--r-- | demo/increment.ur | 6 | ||||
-rw-r--r-- | demo/noisy.ur | 6 | ||||
-rw-r--r-- | demo/roundTrip.ur | 6 |
5 files changed, 30 insertions, 10 deletions
diff --git a/demo/batch.ur b/demo/batch.ur index 4100749f..b7007913 100644 --- a/demo/batch.ur +++ b/demo/batch.ur @@ -37,7 +37,7 @@ fun show withDel lss = </table></xml>}/></xml> end -fun main () = +fun action () = lss <- source Nil; batched <- source Nil; @@ -79,3 +79,7 @@ fun main () = <button value="Execute" onclick={exec ()}/> </body></xml> end + +fun main () = return <xml><body> + <form><submit value="Begin demo" action={action}/></form> +</body></xml> diff --git a/demo/batchG.ur b/demo/batchG.ur index d0071d7d..ea658164 100644 --- a/demo/batchG.ur +++ b/demo/batchG.ur @@ -1,9 +1,13 @@ table t : {Id : int, A : string, B : float} PRIMARY KEY Id -open BatchFun.Make(struct - val tab = t - val title = "BatchG" - val cols = {A = BatchFun.string "A", - B = BatchFun.float "B"} - end) +structure B = BatchFun.Make(struct + val tab = t + val title = "BatchG" + val cols = {A = BatchFun.string "A", + B = BatchFun.float "B"} + end) + +fun main () = return <xml><body> + <form><submit value="Begin demo" action={B.main}/></form> +</body></xml> diff --git a/demo/increment.ur b/demo/increment.ur index a74e80df..36b8191f 100644 --- a/demo/increment.ur +++ b/demo/increment.ur @@ -2,9 +2,13 @@ sequence seq fun increment () = nextval seq -fun main () = +fun action () = src <- source 0; return <xml><body> <dyn signal={n <- signal src; return <xml>{[n]}</xml>}/> <button value="Update" onclick={n <- increment (); set src n}/> </body></xml> + +fun main () = return <xml><body> + <form><submit value="Begin demo" action={action}/></form> +</body></xml> diff --git a/demo/noisy.ur b/demo/noisy.ur index 708cfa2c..7f26eaf2 100644 --- a/demo/noisy.ur +++ b/demo/noisy.ur @@ -25,7 +25,7 @@ fun check ls = | Some a => a); check ls' -fun main () = +fun action () = idAdd <- source ""; aAdd <- source ""; @@ -41,3 +41,7 @@ fun main () = <button value="Delete" onclick={id <- get idDel; del (readError id)}/> <ctextbox source={idDel}/> </body></xml> + +fun main () = return <xml><body> + <form><submit value="Begin demo" action={action}/></form> +</body></xml> diff --git a/demo/roundTrip.ur b/demo/roundTrip.ur index a0d29bf6..c3a111b7 100644 --- a/demo/roundTrip.ur +++ b/demo/roundTrip.ur @@ -6,7 +6,7 @@ fun writeBack v = r <- oneRow (SELECT channels.Channel FROM channels WHERE channels.Client = {[me]}); send r.Channels.Channel v -fun main () = +fun action () = me <- self; ch <- channel; dml (INSERT INTO channels (Client, Channel) VALUES ({[me]}, {[ch]})); @@ -28,3 +28,7 @@ fun main () = <dyn signal={Buffer.render buf}/> </body></xml> end + +fun main () = return <xml><body> + <form><submit value="Begin demo" action={action}/></form> +</body></xml> |