Mercurial > urweb
view demo/more/grid0.ur @ 2063:83bdb52962c9
Check realloc's return code to prevent segfault on out of memoty condition
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Sat, 23 Aug 2014 11:59:34 +0000 |
parents | f0afe61a6f8b |
children |
line wrap: on
line source
open Dbgrid sequence s table t : {Id : int, A : int} PRIMARY KEY Id open Make(struct val tab = t con key = [Id = _] val raw = {Id = {New = nextval s, Inj = _}, A = {New = return 0, Inj = _}} val cols = {Id = Direct.readOnly [#Id] "Id" Direct.int, A = Direct.editable [#A] "A" Direct.int} val aggregates = {} val pageLength = None end) fun main () = grid <- grid; set (showSelection grid) True; return <xml> <head> <link rel="stylesheet" type="text/css" href="../../grid.css"/> </head> <body onload={sync grid}> {render grid} </body> </xml>