correcting bug in raiseArityError

This commit is contained in:
Danny Yoo 2011-09-01 12:06:11 -04:00
parent 81e05b1ac8
commit 0afde50a9a
3 changed files with 39 additions and 0 deletions

View File

@ -128,6 +128,7 @@
[proc.displayName,
expected,
received]);
var contMarks = MACHINE.captureContinuationMarks();
raise(MACHINE,
ExnFailContractArity.constructor(message, contMarks));
};

View File

@ -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 File

@ -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))