annotate tests/crud1.ur @ 352:2205d5cb416a
Get type definitions font-locking again
author |
Adam Chlipala <adamc@hcoop.net> |
date |
Sun, 12 Oct 2008 10:30:08 -0400 |
parents |
3a1e36b14105 |
children |
9390c55b9f1f |
rev |
line source |
adamc@325
|
1 table t1 : {Id : int, A : int, B : string, C : float, D : bool}
|
adamc@325
|
2
|
adamc@325
|
3 open Crud.Make(struct
|
adamc@350
|
4 val tab = t1
|
adamc@350
|
5
|
adamc@350
|
6 val title = "Crud1"
|
adamc@350
|
7
|
adamc@350
|
8 val cols = {
|
adamc@350
|
9 A = {Nam = "A",
|
adamc@350
|
10 Show = txt _,
|
adamc@350
|
11 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>,
|
adamc@350
|
12 WidgetPopulated = fn (nm :: Name) n => <lform><textbox{nm} value={show _ n}/></lform>,
|
adamc@350
|
13 Parse = readError _,
|
adamc@350
|
14 Inject = _},
|
adamc@350
|
15 B = {Nam = "B",
|
adamc@350
|
16 Show = txt _,
|
adamc@350
|
17 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>,
|
adamc@350
|
18 WidgetPopulated = fn (nm :: Name) s => <lform><textbox{nm} value={s}/></lform>,
|
adamc@350
|
19 Parse = readError _,
|
adamc@350
|
20 Inject = _
|
adamc@350
|
21 },
|
adamc@350
|
22 C = {Nam = "C",
|
adamc@350
|
23 Show = txt _,
|
adamc@350
|
24 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>,
|
adamc@350
|
25 WidgetPopulated = fn (nm :: Name) n => <lform><textbox{nm} value={show _ n}/></lform>,
|
adamc@350
|
26 Parse = readError _,
|
adamc@350
|
27 Inject = _
|
adamc@350
|
28 },
|
adamc@350
|
29 D = {Nam = "D",
|
adamc@350
|
30 Show = txt _,
|
adamc@350
|
31 Widget = fn nm :: Name => <lform><checkbox{nm}/></lform>,
|
adamc@350
|
32 WidgetPopulated = fn (nm :: Name) b => <lform><checkbox{nm} checked={b}/></lform>,
|
adamc@350
|
33 Parse = fn x => x,
|
adamc@350
|
34 Inject = _}
|
adamc@350
|
35 }
|
adamc@350
|
36 end)
|