[racket] Racket GUI with Xlib

From: Laurent (laurent.orseau at gmail.com)
Date: Tue Nov 27 12:14:23 EST 2012

On Tue, Nov 27, 2012 at 6:05 PM, Robby Findler
<robby at eecs.northwestern.edu>wrote:

> Well, this is one possible way:
>
> (paramterize ([current-eventspace gui-eventspace]) (queue-callback
> (lambda () (send f popup-menu menu2 100 100))))
>

Just did that, and now it says #t for being in the gui-eventspace, but it
still has the same behavior otherwise (i.e., the popup menu does not show
up and then the button does not work anymore).



> But probably it would be better to make sure that the callback that is
> handling the keystroke be on the gui-eventspace in the first place.
>

I'm not sure what you mean here. Is that different from queue-callback?

Laurent


>
> Robby
>
> On Tue, Nov 27, 2012 at 11:00 AM, Laurent <laurent.orseau at gmail.com>
> wrote:
> >
> >>
> >> >> Is the callback than handles the c-f1 keystroke running in
> >> >> gui-eventspace or in some other eventspace?
> >> >
> >> >
> >> > It's in the gui-eventspace (just checked with a printf and a
> comparison
> >> > with
> >> > `(eq? (current-eventspace) gui-eventspace)'), and so is the button
> >> > callback.
> >>
> >> Not that I doubt your answer, but the telltale test is not that one,
> but:
> >>
> >> (eq? (current-thread) (eventspace-handler-thread gui-eventspace))
> >
> >
> > Aha!
> > With that test, it says yes for the button callback, and no for the C-F1
> > callback.
> > (good thing I wrote my test above, then)
> >
> > So how can I make sure that the C-F1 callback is handled by the
> > gui-eventspace?
> >
> > Laurent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121127/52c0494c/attachment-0001.html>

Posted on the users mailing list.