diff examples/togglepanel.ur @ 23:7c734edc6301

Merge from Adam.
author Karn Kallio <kkallio@eka>
date Sat, 24 Sep 2011 18:55:27 -0430
parents 554e342665fe
children 93140c5cc972
line wrap: on
line diff
--- a/examples/togglepanel.ur	Mon Aug 22 05:06:15 2011 -0430
+++ b/examples/togglepanel.ur	Sat Sep 24 18:55:27 2011 -0430
@@ -4,14 +4,15 @@
 val defaultContent : xbody = <xml><p>Here I am inside the panel.<br/><b>Default format</b></p></xml>
 val otherContent : xbody = <xml><p>Here I am inside the panel.<br/><b>Other format</b></p></xml>
 
-val otherFormat = {FormatPanel = fn ctl panel => <xml><span>A Custom {ctl} Format</span>{panel}</xml>,
-                   OpenCtl = fn behaviour => <xml><a href={bless "http://#"} onclick={behaviour}>View</a></xml>,
-                   CloseCtl = fn behaviour => <xml><a href={bless "http://#"} onclick={behaviour}>Hide</a></xml>}
+val otherFormat = fn [body ~ []] =>
+                     {FormatPanel = fn ctl panel => <xml><span>A Custom {ctl} Format</span>{panel}</xml>,
+                      OpenCtl = fn behaviour => <xml><a href={bless "http://#"} onclick={behaviour}>View</a></xml>,
+                      CloseCtl = fn behaviour => <xml><a href={bless "http://#"} onclick={behaviour}>Hide</a></xml>}
 
 fun main () =
 
-    defaultFormatPanel <- create defaultFormat defaultContent True;
-    otherFormatPanel <- create otherFormat otherContent False;
+    defaultFormatPanel <- create @defaultFormat defaultContent True;
+    otherFormatPanel <- create @otherFormat otherContent False;
 
     return <xml>
       <head>