<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 27, 2012 at 6:05 PM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, this is one possible way:<br>
<br>
(paramterize ([current-eventspace gui-eventspace]) (queue-callback<br>
(lambda () (send f popup-menu menu2 100 100))))<br></blockquote><div><br>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).<br>
<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But probably it would be better to make sure that the callback that is<br>
handling the keystroke be on the gui-eventspace in the first place.<br></blockquote><div><br>I'm not sure what you mean here. Is that different from queue-callback?<br><br>Laurent<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><font color="#888888"><br>
Robby<br>
</font></span><div><div><br>
On Tue, Nov 27, 2012 at 11:00 AM, Laurent <<a href="mailto:laurent.orseau@gmail.com" target="_blank">laurent.orseau@gmail.com</a>> wrote:<br>
><br>
>><br>
>> >> Is the callback than handles the c-f1 keystroke running in<br>
>> >> gui-eventspace or in some other eventspace?<br>
>> ><br>
>> ><br>
>> > It's in the gui-eventspace (just checked with a printf and a comparison<br>
>> > with<br>
>> > `(eq? (current-eventspace) gui-eventspace)'), and so is the button<br>
>> > callback.<br>
>><br>
>> Not that I doubt your answer, but the telltale test is not that one, but:<br>
>><br>
>> (eq? (current-thread) (eventspace-handler-thread gui-eventspace))<br>
><br>
><br>
> Aha!<br>
> With that test, it says yes for the button callback, and no for the C-F1<br>
> callback.<br>
> (good thing I wrote my test above, then)<br>
><br>
> So how can I make sure that the C-F1 callback is handled by the<br>
> gui-eventspace?<br>
><br>
> Laurent<br>
</div></div></blockquote></div><br></div>