view demo/crud3.ur @ 1906:0d2fdc2cc46c

Allow building in a separate build directory Signed-off-by: Anders Kaseorg <andersk@mit.edu> --- Makefile.am | 30 +++--- src/c/Makefile.am | 2 +- src/compiler.mlb | 2 +- src/sources | 302 +++++++++++++++++++++++++++--------------------------- 4 files changed, 168 insertions(+), 168 deletions(-)
author Anders Kaseorg <andersk@mit.edu>
date Fri, 22 Nov 2013 09:36:14 -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)