threading code deactivated; tiny C bugfix: don't report warnings to error callback

This commit is contained in:
Araq 2010-09-19 21:35:44 +02:00
commit 93b3c03dbd
15 changed files with 208 additions and 135 deletions

View file

@ -2,18 +2,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- This has been written by hand. (c) 2008 Andreas Rumpf -->
<!-- This has been written by hand. (c) 2010 Andreas Rumpf -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Nimrod ECMAScript Generator Test</title>
<style type="text/css">
span.DecNumber {color: blue}
</style>
<script src="nimrcache/ecmas.js" type="text/javascript"></script>
<script src="nimcache/ecmas.js" type="text/javascript"></script>
</head>
<body onload="OnLoad()">
<form name="form1" action="ecmas.html">
<input type="text" name="input" size="3" />
<input type="text" name="input1" size="10" />
<input type="button" value="Calculate square" onclick="OnButtonClick()" />
</form>

View file

@ -6,11 +6,14 @@ import
# We need to declare the used elements here. This is annoying but
# prevents any kind of typo:
var
inputElement {.importc: "document.form1.input", nodecl.}: ref TElement
inputElement {.importc: "document.form1.input1", nodecl.}: ref TElement
proc OnButtonClick() {.exportc.} =
var x: int = parseInt($inputElement.value)
echo($(x * x))
#var x = parseInt($inputElement.value)
#echo($(x * x))
var input = $inputElement.value
echo "Test"
echo "Hi, ", input
proc OnLoad() {.exportc.} =
echo("Welcome! Please take your time to fill in this formular!")
echo "Welcome! Please take your time to fill in this formular!"