[racket] plot-frame does not wait at end of process

From: Laurent (laurent.orseau at gmail.com)
Date: Mon Mar 11 03:56:04 EDT 2013

When run from the command line, the following program does not wait for the
frame to be closed, but closes it immediately and ends the program:

#lang racket
(require plot)

(send (plot-frame (lines '((0 0)(1 1))))
       show #t)

;(sleep 1)

If it's too fast for the frame to show up, uncomment the `sleep' line.

When adding another frame like:
(send (new frame% [label "main"] [width 100] [height 40]) show #t)

the program does not halt before the frame is closed though.

I suspect this is because the plot-frame is creating a new event-space, but
I don't know how to solve the problem. (I'm not even sure why a new
event-space is needed here.)

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

Posted on the users mailing list.