Mercurial > urweb
annotate tests/dynTable.ur @ 1663:0577be31a435
First part of changes to avoid depending on C function call argument order of evaluation (omitting normal Ur function calls, so far)
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 07 Jan 2012 15:56:22 -0500 |
parents | ade93cd5bc59 |
children | d2383ffc18ab |
rev | line source |
---|---|
adam@1538 | 1 fun main () : transaction page = |
adam@1538 | 2 s <- source <xml/>; |
adam@1538 | 3 s1 <- source <xml/>; |
adam@1538 | 4 n <- source 0; |
adam@1538 | 5 return <xml><body> |
adam@1538 | 6 <table> |
adam@1538 | 7 <dyn signal={signal s}/> |
adam@1538 | 8 <tr> <td>Hi</td> </tr> |
adam@1538 | 9 </table> |
adam@1538 | 10 |
adam@1538 | 11 <button onclick={v <- get n; |
adam@1538 | 12 set n (v + 1); |
adam@1538 | 13 set s <xml><tr> <td>Whoa!({[v]})</td> </tr></xml>}/> |
adam@1538 | 14 |
adam@1538 | 15 <table> |
adam@1538 | 16 <tr> <dyn signal={signal s1}/> </tr> |
adam@1538 | 17 <tr> <td>Hi!</td> </tr> |
adam@1538 | 18 </table> |
adam@1538 | 19 |
adam@1538 | 20 <button onclick={set s1 <xml><td>Whoa!</td></xml>}/> |
adam@1538 | 21 </body></xml> |