<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).<br>
<br></div><div class="gmail_extra">Laurent<br><br></div><div class="gmail_extra"><br></div></div>