Mercurial > urweb
diff demo/batch.ur @ 1784:e6bc6bbd7a32
Update demo code for key/mouse handler change
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 21 Jul 2012 10:12:35 -0400 |
parents | ed06e25c70ef |
children |
line wrap: on
line diff
--- a/demo/batch.ur Sat Jul 21 10:02:53 2012 -0400 +++ b/demo/batch.ur Sat Jul 21 10:12:35 2012 -0400 @@ -25,7 +25,7 @@ Nil => <xml/> | Cons ((id, a), ls) => <xml> <tr><td>{[id]}</td> <td>{[a]}</td> {if withDel then - <xml><td><button value="Delete" onclick={rpc (del id)}/> + <xml><td><button value="Delete" onclick={fn _ => rpc (del id)}/> </td></xml> else <xml/>} </tr> @@ -64,7 +64,7 @@ {show True lss} - <button value="Update" onclick={ls <- rpc (allRows ()); set lss ls}/><br/> + <button value="Update" onclick={fn _ => ls <- rpc (allRows ()); set lss ls}/><br/> <br/> <h2>Batch new rows to add</h2> @@ -72,11 +72,11 @@ <table> <tr> <th>Id:</th> <td><ctextbox source={id}/></td> </tr> <tr> <th>A:</th> <td><ctextbox source={a}/></td> </tr> - <tr> <th/> <td><button value="Batch it" onclick={add ()}/></td> </tr> + <tr> <th/> <td><button value="Batch it" onclick={fn _ => add ()}/></td> </tr> </table> <h2>Already batched:</h2> {show False batched} - <button value="Execute" onclick={exec ()}/> + <button value="Execute" onclick={fn _ => exec ()}/> </body></xml> end