Mercurial > urweb
view demo/more/grid.urs @ 2142:3288e3c9948b
Fix XML indentation in Emacs mode
The return value of MATCH-STRING is a string. At least on Emacs 25,
the comparisons between string and character with EQUAL could never
succeed, and so the cases for matching braces were never triggered.
GET-TEXT-PROPERTY may return a list rather than an atom (for example,
on long lines with whitespace-mode turned on), and this broke the
heuristic of looking for the tag face in previous text.
author | Julian Squires <julian@cipht.net> |
---|---|
date | Mon, 04 May 2015 14:35:07 -0400 |
parents | be0c4e2e488a |
children |
line wrap: on
line source
con colMeta' = fn (row :: Type) (input :: Type) (filter :: Type) => {Header : string, Project : row -> transaction input, Update : row -> input -> transaction row, Display : input -> xbody, Edit : input -> xbody, Validate : input -> signal bool, CreateFilter : transaction filter, DisplayFilter : filter -> xbody, Filter : filter -> row -> signal bool, Sort : option (row -> row -> bool)} con colMeta = fn (row :: Type) (global :: Type, input :: Type, filter :: Type) => {Initialize : transaction global, Handlers : global -> colMeta' row input filter} con aggregateMeta = fn (row :: Type) (acc :: Type) => {Initial : acc, Step : row -> acc -> acc, Display : acc -> xbody} functor Make(M : sig type row type key val keyOf : row -> key val list : transaction (list row) val new : transaction row val save : key -> row -> transaction unit val delete : key -> transaction unit con cols :: {(Type * Type * Type)} val cols : $(map (colMeta row) cols) val folder : folder cols con aggregates :: {Type} val aggregates : $(map (aggregateMeta row) aggregates) val aggFolder : folder aggregates val pageLength : option int end) : sig type grid val grid : transaction grid val sync : grid -> transaction unit val render : grid -> xbody val showSelection : grid -> source bool val selection : grid -> signal (list M.row) style tab style row style header style data style agg end