[racket] plot-frame does not wait at end of process
A few minutes ago, Robby Findler wrote:
> There is a tension here, but I actually think Racket's default
> strategy is the best one (Matthew and I have discussed this a fair
> amount way back when we were first getting GUI stuff going in
> Racket; Java's strategy is different and leads to race-conditions
> easily, for example.).
In this case, things are kind of obvious if you know about eventspaces
and about the per-plot eventspace feature -- but since this is a quirk
that only plot is doing, most people don't expect it and get
surprised.
> So if plot's function were just something like:
>
> (define (plot-frmae the-args)
> (define f (new frame% ...))
> ..put stuff in frame..
> (send f show #t))
>
> Then just hitting run in DrRacket would show you the multiple plots in
> separate frames fine. At the command-line if you script was
>
> #lang racket
> (require plot)
> (plot-frame ...)
> (plot-frame ...)
> (plot-frame ...)
>
> then that would also work fine (not exiting until you closed all the
> windows).
+17 if it can work like this. Otherwise, if there's a reason it
can't, then I think that the new-namespace could be available as a
keyword or parameter thing. But the default should be the
no-surprises version.
> I can't recall anymore the use-case that let Neil to what he's done
> here, so we probably should revisit that.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!