diff said.rhope @ 147:f3686f60985d

Sort of working port of framework. Transaction bug seems to be getting in the way. Going to work around, but want the old version in the repo so I can test later.
author Mike Pavone <pavone@retrodev.com>
date Mon, 22 Nov 2010 01:15:02 -0500
parents 76568becd6d6
children f582fd6c75ee
line wrap: on
line diff
--- a/said.rhope	Sun Nov 21 22:47:14 2010 -0500
+++ b/said.rhope	Mon Nov 22 01:15:02 2010 -0500
@@ -17,7 +17,7 @@
 	//Then we empty the page object
 	]Clear Children
 	//And we add a hyperlink
-	]Add Child[New@Web Link["Click Here","/said"]]
+	]Add Child[Web Link["Click Here","/said"]]
 }
 
 //This worker defines our page
@@ -30,17 +30,20 @@
 		out <- [page]Add Child[ ["You said: "]Append[~] ]
 	}{
 		//Otherwise we provide them with a form to enter a word
-		out <- [[[page]Add Child[New@Web Field["foo","","text"]]
+		out <- [[[page]Add Child[Web Field["foo","","text"]]
 			]Add Child[
-				New@Web Button["blah","Click!"]
+				Web Button["blah","Click!"]
 			//The Set Handler call here attaches the worker Save Text to the click event for the page
 			//Events propagate can propagate themselves up the page hierarchy and handled wherever appropriate
 			]]Set Handler["click","Save Text"]
 	}
 }
 
-Main[]
+Main[args]
 {
+	[args]Index[1]
+	{ port <- Int32[~] }
+	{ port <- Val[80] }
 	//Start Web starts the webserver and initializes the web framework
 	Start Web[
 		//It takes a dictionary mapping paths to Workers that define dynamic pages
@@ -48,6 +51,6 @@
 		//that allows the framework to take care of some of the drudgework for us
 		//The first element in the list is the worker name, the second the page title 
 		//and the third element indicates whether this page will be using session data or not
-		[New@Dictionary[]]Set["/said",("Said","That's what she said",Yes)]
+		[Dictionary[]]Set["/said",[(0,"That's what she said",Yes)]Set[0,Said[?]]], port
 	]
 }