[racket] plot-frame does not wait at end of process
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.).
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).
I can't recall anymore the use-case that let Neil to what he's done here,
so we probably should revisit that.
Robby
On Mon, Mar 11, 2013 at 1:41 PM, Jay McCarthy <jay.mccarthy at gmail.com>wrote:
> I like the current behavior because I often render multiple plots and
> want to see them all at the same time.
>
> Jay
>
> On Mon, Mar 11, 2013 at 6:37 AM, Eli Barzilay <eli at barzilay.org> wrote:
> > Just now, Robby Findler wrote:
> >> Neil has done this intentionally (making plot-frame create its own
> >> eventspace).
> >
> > Yes, I know. And it even started from a similar use case of a quick
> > progran that shows a plot. IMO, it is the wrong fix, because it
> > forces the non-trivial sync line. It would be much better if the
> > plotting itself would do the waiting (and maybe not even do the new
> > namespace), at least by default.
> >
> >
> >
> >> On Mon, Mar 11, 2013 at 7:26 AM, Eli Barzilay <eli at barzilay.org> wrote:
> >>
> >> Three hours ago, Laurent wrote:
> >> > On Mon, Mar 11, 2013 at 10:12 AM, Danny Yoo <
> dyoo at hashcollision.org>
> >> wrote:
> >> >
> >> > (sync (send f get-eventspace))
> >> >
> >> > Thanks Danny, exactly what I need!
> >> > (I had forgotten `sync' and `get-eventspace' could be combined...)
> >>
> >> Since this is not the first time it comes up -- Neil: How about
> fixing
> >> this?
> >>
> >> --
> >> ((lambda (x) (x x)) (lambda (x) (x x))) Eli
> Barzilay:
> >> http://barzilay.org/ Maze is
> Life!
> >> ____________________
> >> Racket Users list:
> >> http://lists.racket-lang.org/users
> >>
> >
> > --
> > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
> > http://barzilay.org/ Maze is Life!
> >
> > ____________________
> > Racket Users list:
> > http://lists.racket-lang.org/users
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://faculty.cs.byu.edu/~jay
>
> "The glory of God is Intelligence" - D&C 93
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130311/4a34437f/attachment.html>