comparison demo/more/grid1.ur @ 940:e2be476673f2

Selection working, but switching it on isn't
author Adam Chlipala <adamc@hcoop.net>
date Tue, 15 Sep 2009 11:18:20 -0400
parents 37dd42935dad
children b8d7a47b8e0c
comparison
equal deleted inserted replaced
939:38a376dc7401 940:e2be476673f2
51 Sum = {Initial = 0, 51 Sum = {Initial = 0,
52 Step = fn r n => r.A + n, 52 Step = fn r n => r.A + n,
53 Display = txt}, 53 Display = txt},
54 Dummy2 = {Initial = (), 54 Dummy2 = {Initial = (),
55 Step = fn _ _ => (), 55 Step = fn _ _ => (),
56 Display = fn _ => <xml>-</xml>}, 56 Display = fn _ => <xml/>},
57 And = {Initial = True, 57 And = {Initial = True,
58 Step = fn r b => r.C && b, 58 Step = fn r b => r.C && b,
59 Display = txt}} 59 Display = txt}}
60 end) 60 end)
61 61
62 fun main () = 62 fun main () =
63 grid <- grid; 63 grid <- grid;
64 set (showSelection grid) True;
64 return <xml> 65 return <xml>
65 <head> 66 <head>
66 <link rel="stylesheet" type="text/css" href="../../grid.css"/> 67 <link rel="stylesheet" type="text/css" href="../../grid.css"/>
67 </head> 68 </head>
68 <body onload={sync grid}> 69 <body onload={sync grid}>
69 {render grid} 70 {render grid}
71 <hr/>
72 Selection: <dyn signal={ls <- selection grid;
73 return (List.mapX (fn r => <xml>{[r.Id]}; </xml>) ls)}/>
70 </body> 74 </body>
71 </xml> 75 </xml>