diff tests/crud1.ur @ 347:58eeeb3cbf40

Use checkbox in CRUD example
author Adam Chlipala <adamc@hcoop.net>
date Sat, 04 Oct 2008 16:15:13 -0400
parents 389399d65331
children b88f4297167f
line wrap: on
line diff
--- a/tests/crud1.ur	Sat Oct 04 15:54:03 2008 -0400
+++ b/tests/crud1.ur	Sat Oct 04 16:15:13 2008 -0400
@@ -5,7 +5,7 @@
                 A = (int, string),
                 B = (string, string),
                 C = (float, string),
-                D = (bool, string)
+                D = (bool, bool)
         ]
 
         val tab = t1
@@ -40,9 +40,9 @@
                 D = {
                         Nam = "D",
                         Show = txt _,
-                        Widget = fn nm :: Name => <lform><textbox{nm}/></lform>,
-                        WidgetPopulated = fn (nm :: Name) b => <lform><textbox{nm} value={show _ b}/></lform>,
-                        Parse = readError _,
+                        Widget = fn nm :: Name => <lform><checkbox{nm}/></lform>,
+                        WidgetPopulated = fn (nm :: Name) b => <lform><checkbox{nm} checked={b}/></lform>,
+                        Parse = fn x => x,
                         Inject = sql_bool
                     }
         }