diff options
author | 2012-07-21 10:12:35 -0400 | |
---|---|---|
committer | 2012-07-21 10:12:35 -0400 | |
commit | 84a14ca026a8ca7ed4488e51506340b249809fae (patch) | |
tree | 69937e8dd046f5e3b3ea38f66061cdc8310351bc /demo/more/grid.ur | |
parent | adfa70ae09d13b338efee432b1e0bfc73af5e104 (diff) |
Update demo code for key/mouse handler change
Diffstat (limited to 'demo/more/grid.ur')
-rw-r--r-- | demo/more/grid.ur | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/demo/more/grid.ur b/demo/more/grid.ur index a281bab7..9691442c 100644 --- a/demo/more/grid.ur +++ b/demo/more/grid.ur @@ -124,7 +124,7 @@ functor Make(M : sig fun render (grid : grid) = <xml> <table class={tabl}> <tr class={tr}> - <th/> <th/> <th><button value="No sort" onclick={set grid.Sort None}/></th> + <th/> <th/> <th><button value="No sort" onclick={fn _ => set grid.Sort None}/></th> {@mapX2 [fst3] [colMeta M.row] [tr] (fn [nm :: Name] [p :: (Type * Type * Type)] [rest :: {(Type * Type * Type)}] [[nm] ~ rest] data (meta : colMeta M.row p) => @@ -132,7 +132,7 @@ functor Make(M : sig {case (meta.Handlers data).Sort of None => txt (meta.Handlers data).Header | sort => <xml><button value={(meta.Handlers data).Header} - onclick={set grid.Sort sort}/></xml>} + onclick={fn _ => set grid.Sort sort}/></xml>} </th></xml>) M.folder grid.Cols M.cols} </tr> @@ -197,16 +197,16 @@ functor Make(M : sig <td> <dyn signal={b <- signal ud; return (if b then - <xml><button value="Save" onclick={save}/></xml> + <xml><button value="Save" onclick={fn _ => save}/></xml> else - <xml><button value="Update" onclick={update}/></xml>)}/> + <xml><button value="Update" onclick={fn _ => update}/></xml>)}/> </td> <td><dyn signal={b <- signal ud; return (if b then - <xml><button value="Cancel" onclick={cancel}/></xml> + <xml><button value="Cancel" onclick={fn _ => cancel}/></xml> else - <xml><button value="Delete" onclick={delete}/></xml>)}/> + <xml><button value="Delete" onclick={fn _ => delete}/></xml>)}/> </td> <dyn signal={cols <- signal colsS; @@ -302,8 +302,8 @@ functor Make(M : sig else <xml> <button value={show (n + 1)} - onclick={set grid.Position - (n * plen) + onclick={fn _ => set grid.Position + (n * plen) }/></xml>)}/> {if (n + 1) * plen >= avail then <xml/> else <xml>|</xml>} {pages (n + 1)} @@ -313,9 +313,9 @@ functor Make(M : sig end)}/> </xml>} - <button value="New row" onclick={row <- rpc M.new; - addRow grid.Cols grid.Rows row}/> - <button value="Refresh" onclick={sync grid}/> + <button value="New row" onclick={fn _ => row <- rpc M.new; + addRow grid.Cols grid.Rows row}/> + <button value="Refresh" onclick={fn _ => sync grid}/> </xml> fun showSelection grid = grid.Selection |