Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

correcting bug in raiseArityError

  • Loading branch information...
commit 0afde50a9abef711c4095e10fc99948202633f9e 1 parent 81e05b1
Danny Yoo authored
View
1  js-assembler/runtime-src/baselib-exceptions.js
@@ -128,6 +128,7 @@
[proc.displayName,
expected,
received]);
+ var contMarks = MACHINE.captureContinuationMarks();
raise(MACHINE,
ExnFailContractArity.constructor(message, contMarks));
};
View
14 web-world/examples/todo/index.html
@@ -0,0 +1,14 @@
+<html>
+<head><title>TODO List</title></head>
+<body>
+<h1>TODO</h1>
+
+<h2>Items</h2>
+<ul id="items"></ul>
+
+
+<h2>Adding an item</h2>
+<input type="text" id="next-item"/>
+<input type="button" id="add-button" value="Add!"/>
+</body>
+</html>
View
24 web-world/examples/todo/todo.rkt
@@ -0,0 +1,24 @@
+#lang planet dyoo/whalesong
+(require (planet dyoo/whalesong/web-world)
+ (planet dyoo/whalesong/resource))
+
+;; The world is our TODO list, represented as a list of strings.
+
+(define-resource index.html)
+
+
+
+(define (on-add world view)
+ (local [(define text (view-text (view-focus view "next-item")))]
+ (printf "Ok, added\n")
+ (cons text world)))
+
+
+(define the-view
+ (view-bind (view-focus (->view index.html)
+ "add-button"
+ on-add)))
+
+
+(big-bang '()
+ (initial-view the-view))
Please sign in to comment.
Something went wrong with that request. Please try again.