I have a multithreaded GUI app that uses a text editor for its output port.  Every once in a while, I get an error I believe is related to multiple threads accessing the text editor output port.  <br><br>I don&#39;t seem to get the error if I leave the outport port alone and use the default output port from DrScheme.  The error is:<br>
<br>    sequence-contract-violation: negative: method insert cannot be called, except in states (unlocked), args ...<br clear="all"><br>I install a custom output port using something along the lines of [slightly condensed from real version]:<br>
<br>(define console%  <br>  (class frame%    <br>    (super-new<br>     (parent #f)<br>     (width 720)<br>     (height 300)<br>     (label &quot;Console&quot;))   <br>    (define _text-editor (new text%))    <br>    (define _canvas <br>
      (new editor-canvas%<br>           (parent this)<br>           (editor _text-editor)))<br>   (current-output-port (open-output-text-editor _text-editor))))<br><br>(define console [new console%])<br><br>Is it possible to safely due what I am trying to do?  I just want to create a frame that has the output to the current-output-port, so that individual pieces can just write to current-output-port as usual and not have to know its being redirected to a GUI frame.<br>
<br>I&#39;m using using 4.2 on Windows XP if it matters.<br><br>-- <br>Christopher W. Bowron &lt;<a href="mailto:chris@bowron.us">chris@bowron.us</a>&gt;<br>[ Nothing is exciting if you know what the outcome will be ]<br>
    - Joseph Campbell<br>