correcting bug in raiseArityError
This commit is contained in:
parent
81e05b1ac8
commit
0afde50a9a
|
@ -128,6 +128,7 @@
|
|||
[proc.displayName,
|
||||
expected,
|
||||
received]);
|
||||
var contMarks = MACHINE.captureContinuationMarks();
|
||||
raise(MACHINE,
|
||||
ExnFailContractArity.constructor(message, contMarks));
|
||||
};
|
||||
|
|
14
web-world/examples/todo/index.html
Normal file
14
web-world/examples/todo/index.html
Normal 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>
|
24
web-world/examples/todo/todo.rkt
Normal file
24
web-world/examples/todo/todo.rkt
Normal 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))
|
Loading…
Reference in New Issue
Block a user