[plt-scheme] I miss end-of-time...

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sat Mar 13 19:36:39 EST 2010

On Mar 13, 2010, at 2:41 PM, Mark Engelberg wrote:

> OK, I'm getting confused here.
> 1.  What are the important differences between stop-with and end-of-time?

'stop-with' is just a constructor for a world, meaning (stop-with 10) is just a special kind of world. You could introduce it via a definition: 

(define lost-world (stop-with "you lost"))
(define won-world (stop-with "you won"))

And your event handlers could return one of these worlds as they see fit: 

(define (mouse-handler w x y me) (if (= x 100) lost-world w))

;; --- 

end-of-time is an imperative command that shuts down the current thread and custodian. 

> 2.  Does render get called again after stop-with?  

Yes. See docs. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100313/ad98906b/attachment.html>

Posted on the users mailing list.