changeset 189:d0e3a13c1bd9 default tip

Remove old calculator example
author Mike Pavone <pavone@retrodev.com>
date Fri, 07 Oct 2011 00:24:04 -0700
parents 170ad9cb6384
children
files calc.rhope
diffstat 1 files changed, 0 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/calc.rhope	Fri Oct 07 00:22:31 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-	This program implements a simple GUI calculator
-	Currently only the Windows and Syllable ports of Rhope have GUI support
-*/
-
-
-Add[window]
-{
-	[window]Get Value["right"]
-	{
-		<String@Real Number[~]
-		{
-			[window]Set Value["left", [~] + [[window]Get Value["left"]]]
-			[window]Set Value["right", "0"]
-		}
-	}
-}
-
-Sub[window]
-{
-	[window]Get Value["right"]
-	{
-		[window]Set Value["left", [<String@Real Number[ [window]Get Value["left"] ]] - [~]]
-		[window]Set Value["right", "0"]
-	}
-}
-
-Main[]
-{
-	[[[[[[New@Window["Visuality Calculator", 400.0, 400.0]
-	]Add Widget["+", [New@Button["+", 20.0, 20.0]]Set Handler["click","Add"], 20.0, 60.0]
-	]Add Widget["-", [New@Button["-", 20.0, 20.0]]Set Handler["click","Sub"], 60.0, 60.0]
-	]Add Widget["left", [New@Input Box["0", 170.0, 20.0]]Set Type["numeric"], 20.0, 20.0]
-	]Add Widget["right", [New@Input Box["0", 170.0, 20.0]]Set Type["numeric"], 210.0, 20.0]
-	]Show[20.0,20.0]
-	]Wait Close
-}