<div dir="ltr">I have the impression that invoking methods like 'set' aren't supposed to invoke callbacks like that, generally speaking.<div><br></div><div>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sun, Sep 15, 2013 at 9:58 AM, Laurent <span dir="ltr"><<a href="mailto:laurent.orseau@gmail.com" target="_blank">laurent.orseau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Sep 15, 2013 at 4:34 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div dir="ltr">What was the issue?<span></span></div></blockquote><div><br></div></div>
It was an infinite loop triggered by a particular callback in list-box%:<br><br>#lang racket/gui<br><br>(define my-frame (new frame% [label "my-frame"] <br>                      [min-width 200] [min-height 200]))<br>



<br>(define lb (new list-box%<br>                [parent my-frame]<br>                [label "values"]<br>                [choices '("a" "b")]<br>                [callback (λ(lb ev) <br>


                            (displayln (send ev get-event-type))<br>
                            (send lb clear)<br>                            (send lb set '("b"))<br>                            )]))<br><br>(send my-frame show #t)<br><br>Click on "b", this will trigger infinite events<br>



<br></div><div class="gmail_extra">It's actually the combination of the callback calling `clear' and `set' that triggers this infinite loop.<br></div><div class="gmail_extra">The problem is easily solved by removing `(clear)', which is redundant with `set' anyway (which I hadn't understood at first).<span class="HOEnZb"><font color="#888888"><br>



<br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">Laurent<br><br></div><div class="gmail_extra"><br></div></font></span></div>
</blockquote></div><br></div>