adamc@422: table t : {Id : int, Nam : string, Ready : bool}
adamc@708: PRIMARY KEY Id
adamc@422:
adamc@422: open Crud.Make(struct
adamc@422: val tab = t
adamc@422:
adamc@422: val title = "Are you ready?"
adamc@422:
adamc@422: val cols = {Nam = Crud.string "Name",
adamc@422: Ready = {Nam = "Ready",
adamc@422: Show = (fn b => if b then
adamc@422: Ready!
adamc@422: else
adamc@422: Not ready),
adamc@422: Widget = (fn (nm :: Name) =>
adamc@422:
adamc@422: ),
adamc@422: WidgetPopulated = (fn (nm :: Name) b =>
adamc@422:
adamc@422: ),
adamc@422: Parse = (fn s =>
adamc@422: case s of
adamc@422: "Ready" => True
adamc@422: | "Not ready" => False
adamc@422: | _ => error Invalid ready/not ready),
adamc@422: Inject = _
adamc@422: }
adamc@422: }
adamc@422: end)