summaryrefslogtreecommitdiff
path: root/demo/more/grid1.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-09-15 10:18:56 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-09-15 10:18:56 -0400
commit44eb43907a88455c0cf223a411860a27d59c78b6 (patch)
treeb81fba316b6a552d9b1cf527831175d0926da43f /demo/more/grid1.ur
parenta8fa8a4567570b1925ff11b17da729ac32cd191e (diff)
Summary row with aggregates
Diffstat (limited to 'demo/more/grid1.ur')
-rw-r--r--demo/more/grid1.ur13
1 files changed, 12 insertions, 1 deletions
diff --git a/demo/more/grid1.ur b/demo/more/grid1.ur
index 829cf052..edd5858d 100644
--- a/demo/more/grid1.ur
+++ b/demo/more/grid1.ur
@@ -45,7 +45,18 @@ open Make(struct
DA = computed "2A" (fn r => 2 * r.A),
Link = computedHtml "Link" (fn r => <xml><a link={page (r.A, r.B)}>Go</a></xml>)}
- val aggregates = {}
+ val aggregates = {Dummy1 = {Initial = (),
+ Step = fn _ _ => (),
+ Display = fn _ => <xml/>},
+ Sum = {Initial = 0,
+ Step = fn r n => r.A + n,
+ Display = txt},
+ Dummy2 = {Initial = (),
+ Step = fn _ _ => (),
+ Display = fn _ => <xml>-</xml>},
+ And = {Initial = True,
+ Step = fn r b => r.C && b,
+ Display = txt}}
end)
fun main () =