Mercurial > urweb
view tests/updateErr.ur @ 1767:1bbad32cb4a8
Implicit records of folders
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 17 May 2012 16:22:05 -0400 |
parents | 7c6b6c3c7b79 |
children | abb0e95dcaa1 |
line wrap: on
line source
fun main () : transaction page = s <- source ""; b <- Buffer.create; txt <- source ""; return <xml><body onload={onError (fn xml => Buffer.write b (show xml)); onFail (fn s => alert ("FAIL! " ^ s))}> <dyn signal={s <- signal s; return <xml>{[s]}</xml>}/><br/> <dyn signal={s <- signal s; if s = "" then return <xml>Init</xml> else error <xml>Crapky</xml>}/><br/> <dyn signal={s <- signal s; return <xml>"{[s]}"</xml>}/><br/> <ctextbox source={txt}/> <button onclick={s' <- get txt; set s s'; set txt ""}/> <hr/> <dyn signal={Buffer.render b}/> </body></xml>