diff examples/datebox.ur @ 20:554e342665fe

Add a new parameter to Gui.gui
author Adam Chlipala <adam@chlipala.net>
date Sat, 24 Sep 2011 15:47:00 -0400
parents 8300d5f0dc19
children
line wrap: on
line diff
--- a/examples/datebox.ur	Fri Sep 23 13:30:01 2011 +0200
+++ b/examples/datebox.ur	Sat Sep 24 15:47:00 2011 -0400
@@ -1,15 +1,14 @@
 fun main () =
+    tm <- now;
 
-tm <- now;
+    dayCtl <- Datebox.create tm;
 
-dayCtl <- Datebox.create tm;
+    load <- return (Datebox.onChange dayCtl (fn d => alert (show d.Day)));
 
-load <- return (Datebox.onChange dayCtl (fn d => alert (show d.Day)));
-
-return
-    <xml>
-      <head><title>Datebox Example</title></head>
-      <body onload={load}>
-        {Datebox.render dayCtl}
-      </body>
-    </xml>
+    return
+        <xml>
+          <head><title>Datebox Example</title></head>
+          <body onload={load}>
+            {Gui.toXml dayCtl}
+          </body>
+        </xml>