Mercurial > urweb
view demo/crud3.ur @ 1675:13dad713da35
New, more principled heuristic for Especialize: only specialize uniform function arguments; that is, arguments that don't change across recursive calls
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 11 Jan 2012 13:53:35 -0500 |
parents | c7b9a33c26c8 |
children |
line wrap: on
line source
table t : {Id : int, Text : string} PRIMARY KEY Id open Crud.Make(struct val tab = t val title = "Crud3" val cols = {Text = {Nam = "Text", Show = txt, Widget = (fn [nm :: Name] => <xml> <subform{nm}> <textbox{#A}/> <textbox{#B}/> </subform> </xml>), WidgetPopulated = (fn [nm :: Name] s => <xml> <subform{nm}> <textbox{#A} value={s}/> <textbox{#B}/> </subform> </xml>), Parse = (fn p : {A : string, B : string} => p.A ^ p.B), Inject = _ } } end)