<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Thu, Aug 7, 2014 at 2:19 PM, Alex Queiroz <span dir="ltr"><<a href="mailto:asandroq@gmail.com" target="_blank">asandroq@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hallo,<br>
<div><br>
On Thu, Aug 7, 2014 at 2:13 PM, Álvaro Castro-Castilla<br>
<<a href="mailto:alvaro.castro.castilla@gmail.com" target="_blank">alvaro.castro.castilla@gmail.com</a>> wrote:<br>
><br>
> That works for implementing the events, but where is the Gambit ___setup<br>
> function running? You can't return from this function without breaking<br>
> Gambit's system.<br>
><br>
<br>
</div>`___setup` doesn't need to be "running". You call it and after it is<br>
finished, you can call your functions. If your code needs to do work<br>
in the background, you can install a timer in the host system and keep<br>
calling into Gambit.<br>
<div><div><br></div></div></blockquote><div><br></div><div>Yes, you are right. I've actually done it long time ago, now that I recall. Let me try the idea, and see if I can cleanly satisfy the library requirement.<br>


<br></div><div>But yes, apparently I wasn't thinking, since if you don't have to keep running ___setup() then it's easy to implement callbacks. Actually, the name ___setup and the fact that ___cleanup is an independent function makes it pretty clear. Otherwise it would have been ___run or something similar. The confusion stemmed from the fact that I was running Scheme code directly without calling any (c-define)'d function after ___setup(). But as I said, I've done that before, so I wasn't thinking.<br>


<br></div><div>Thank you!<br></div></div></div></div>