Skip to content

Commit

Permalink
changing dwarves-with-remove to use view-bind-many*
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny Yoo committed Feb 13, 2012
1 parent 1a6e082 commit 46c0ba5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions scribblings/manual.scrbl
Expand Up @@ -963,6 +963,7 @@ Common event types include @racket["click"], @racket["mouseenter"], or
@racket["change"].} Note that the name of each event should not
include an @racket["on"] prefix.


As an example:
@codeblock|{
(define (click-handler w v) ...)
Expand Down
10 changes: 4 additions & 6 deletions web-world/examples/dwarves-with-remove/dwarves-with-remove.rkt
Expand Up @@ -43,12 +43,10 @@
;; The first view consists of index.html. We attach event handlers
;; to each name here.
(define my-view
(foldl (lambda (name view)
(view-bind (view-focus view name)
"click"
hide-on-click))
(->view index.html)
dwarf-names))
(view-bind-many* (->view index.html)
(map (lambda (name)
(list name "click" hide-on-click))
dwarf-names)))


(big-bang dwarf-names
Expand Down

0 comments on commit 46c0ba5

Please sign in to comment.