summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-09-15 16:27:24 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-09-15 16:27:24 -0400
commit24f99305fcda201f67c8de846bb2d683011099b7 (patch)
tree756eaf0f95a332ae7076c61efff8d1ee8133e0e7 /demo
parent6b1c568299c1625ea0f1441268b17aee37930c5c (diff)
Filters displaying properly
Diffstat (limited to 'demo')
-rw-r--r--demo/more/dbgrid.ur12
1 files changed, 8 insertions, 4 deletions
diff --git a/demo/more/dbgrid.ur b/demo/more/dbgrid.ur
index 59214348..eb30a990 100644
--- a/demo/more/dbgrid.ur
+++ b/demo/more/dbgrid.ur
@@ -109,7 +109,11 @@ structure Direct = struct
Parse = fn s => v <- signal s; return (m.Parse v),
CreateFilter = source m.CreateFilter,
DisplayFilter = m.DisplayFilter,
- Filter = fn f v => f <- signal f; return (m.Filter f v)},
+ Filter = fn f v => f <- signal f;
+ return (if m.FilterIsNull f then
+ True
+ else
+ m.Filter f v)},
{Display = fn s => <xml><dyn signal={v <- signal s; return (m.Display v)}/></xml>,
Edit = m.Edit,
Initialize = fn v => source (case v of
@@ -126,7 +130,7 @@ structure Direct = struct
DisplayFilter = m.DisplayFilter,
Filter = fn f v => f <- signal f;
return (if m.FilterIsNull f then
- Option.isNone v
+ True
else
case v of
None => False
@@ -143,13 +147,13 @@ structure Direct = struct
type intFilter = basicFilter string
val int : meta (intGlobal, int, intInput, intFilter) =
basic {Display = fn s => <xml>{[s]}</xml>,
- Edit = fn s => <xml><ctextbox source={s}/></xml>,
+ Edit = fn s => <xml><ctextbox size={5} source={s}/></xml>,
Initialize = fn n => show n,
InitializeNull = "",
IsNull = eq "",
Parse = fn v => read v,
CreateFilter = "",
- DisplayFilter = fn s => <xml><ctextbox source={s}/></xml> : xbody,
+ DisplayFilter = fn s => <xml><ctextbox size={5} source={s}/></xml> : xbody,
Filter = fn s n =>
case read s of
None => True