<div dir="ltr">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.). <div>
<br></div><div>So if plot's function were just something like:</div><div><br></div><div style> (define (plot-frmae the-args)</div><div style> (define f (new frame% ...))</div><div style> ..put stuff in frame..</div>
<div style> (send f show #t))</div><div><div><br></div><div>Then just hitting run in DrRacket would show you the multiple plots in separate frames fine. At the command-line if you script was</div><div><br></div><div style>
#lang racket</div><div style>(require plot)</div><div style><div>(plot-frame ...)</div><div><div>(plot-frame ...)</div></div><div><div>(plot-frame ...)</div></div><div><br></div><div style>then that would also work fine (not exiting until you closed all the windows).</div>
<div style><br></div></div><div>I can't recall anymore the use-case that let Neil to what he's done here, so we probably should revisit that.<br></div><div><br>Robby</div></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Mon, Mar 11, 2013 at 1:41 PM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com" target="_blank">jay.mccarthy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I like the current behavior because I often render multiple plots and<br>
want to see them all at the same time.<br>
<br>
Jay<br>
<div><div class="h5"><br>
On Mon, Mar 11, 2013 at 6:37 AM, Eli Barzilay <<a href="mailto:eli@barzilay.org">eli@barzilay.org</a>> wrote:<br>
> Just now, Robby Findler wrote:<br>
>> Neil has done this intentionally (making plot-frame create its own<br>
>> eventspace).<br>
><br>
> Yes, I know. And it even started from a similar use case of a quick<br>
> progran that shows a plot. IMO, it is the wrong fix, because it<br>
> forces the non-trivial sync line. It would be much better if the<br>
> plotting itself would do the waiting (and maybe not even do the new<br>
> namespace), at least by default.<br>
><br>
><br>
><br>
>> On Mon, Mar 11, 2013 at 7:26 AM, Eli Barzilay <<a href="mailto:eli@barzilay.org">eli@barzilay.org</a>> wrote:<br>
>><br>
>> Three hours ago, Laurent wrote:<br>
>> > On Mon, Mar 11, 2013 at 10:12 AM, Danny Yoo <<a href="mailto:dyoo@hashcollision.org">dyoo@hashcollision.org</a>><br>
>> wrote:<br>
>> ><br>
>> > (sync (send f get-eventspace))<br>
>> ><br>
>> > Thanks Danny, exactly what I need!<br>
>> > (I had forgotten `sync' and `get-eventspace' could be combined...)<br>
>><br>
>> Since this is not the first time it comes up -- Neil: How about fixing<br>
>> this?<br>
>><br>
>> --<br>
>> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:<br>
>> <a href="http://barzilay.org/" target="_blank">http://barzilay.org/</a> Maze is Life!<br>
>> ____________________<br>
>> Racket Users list:<br>
>> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
>><br>
><br>
> --<br>
> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:<br>
> <a href="http://barzilay.org/" target="_blank">http://barzilay.org/</a> Maze is Life!<br>
><br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br>
<br>
<br>
--<br>
</div></div>Jay McCarthy <<a href="mailto:jay@cs.byu.edu">jay@cs.byu.edu</a>><br>
Assistant Professor / Brigham Young University<br>
<a href="http://faculty.cs.byu.edu/~jay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>
"The glory of God is Intelligence" - D&C 93<br>
</blockquote></div><br></div>