From f243a0e6176de32df1619ddbd9f08560ec9e240e Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Mon, 24 May 2010 10:03:59 -0400 Subject: [PATCH] fixed 10922 --- collects/teachpack/2htdp/scribblings/universe.scrbl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/collects/teachpack/2htdp/scribblings/universe.scrbl b/collects/teachpack/2htdp/scribblings/universe.scrbl index f5837cfd61..02a3fc3326 100644 --- a/collects/teachpack/2htdp/scribblings/universe.scrbl +++ b/collects/teachpack/2htdp/scribblings/universe.scrbl @@ -375,13 +375,18 @@ All @tech{MouseEvent}s are represented via strings: #:contracts ([clack-expr (-> (unsyntax @tech{WorldState}) - natural-number/c natural-number/c (unsyntax @tech{MouseEvent}) + integer? integer? (unsyntax @tech{MouseEvent}) (unsyntax @tech{WorldState}))])]{ tell DrRacket to call @scheme[clack-expr] on the current world, the current @scheme[x] and @scheme[y] coordinates of the mouse, and and a @tech{MouseEvent} for every (noticeable) action of the mouse by the computer user. The result of the call becomes the current world. + For @scheme["leave"] and @scheme["enter"] events, the coordinates of the + mouse click may be outside of the (implicitly) rectangle. That is, the + coordinates may be negative or larger than the (implicitly) specified + width and height. + Note: the computer's software doesn't really notice every single movement of the mouse (across the mouse pad). Instead it samples the movements and signals most of them.} @@ -698,7 +703,7 @@ As mentioned, all event handlers may return @tech{WorldState}s or #:contracts ([clack-expr (-> (unsyntax @tech{WorldState}) - natural-number/c natural-number/c (unsyntax @tech{MouseEvent}) + integer? integer? (unsyntax @tech{MouseEvent}) (or/c (unsyntax @tech{WorldState}) package?))])]{ }