diff 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
line wrap: on
line diff
--- a/demo/more/grid1.ur	Tue Sep 15 10:50:49 2009 -0400
+++ b/demo/more/grid1.ur	Tue Sep 15 11:18:20 2009 -0400
@@ -53,7 +53,7 @@
                                        Display = txt},
                                 Dummy2 = {Initial = (),
                                           Step = fn _ _ => (),
-                                          Display = fn _ => <xml>-</xml>},
+                                          Display = fn _ => <xml/>},
                                 And = {Initial = True,
                                        Step = fn r b => r.C && b,
                                        Display = txt}}
@@ -61,11 +61,15 @@
 
 fun main () =
     grid <- grid;
+    set (showSelection grid) True;
     return <xml>
       <head>
         <link rel="stylesheet" type="text/css" href="../../grid.css"/>
       </head>
       <body onload={sync grid}>
         {render grid}
+        <hr/>
+        Selection: <dyn signal={ls <- selection grid;
+                                return (List.mapX (fn r => <xml>{[r.Id]}; </xml>) ls)}/>
       </body>
     </xml>