<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">In playing with the MCL 5.1 demo program, I notice that the Window class included in the image allows one to instantiate the window, and it immediately pops up:<DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">Welcome to the demo version of Macintosh Common Lisp Version 5.1!</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">? (defvar *T* (make-instance 'window))</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">*T*</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The window identifies itself as part of the MCL program (at least, no separate process or tray icon is created), and I continue to be able to interact with the MCL console to create new forms, etc.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I've written (or rather, stolen) a window implementation based on Mikel's Clotho/Bosco stuff, and so I also get a nice window to pop up from my OpenMCL session. However, my window is "dead" in that it doesn't respond to events though I can update images in a graphic context embedded in the window.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I fully understand that the problem is that the window I generated is not being serviced by any kind of an event/message loop. However, if I were to do so from the constructor of the window I would end up with a "locked" OpenMCL console since it would never return from the window (until the event loop was exited).</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">So, I see a few options and I'm curious if anyone can provide context/suggestions for the right way to go.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">1. Each window could be launched in its own thread which would execute the run-loop. I'm not sure if there would be any threading concerns here, but I imagine this would be a fairly simple approach. However, examining the MCL running image with the OS X development tool "Thread Viewer" shows no new threads created as I open windows. So, another possibility is:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">2. A single event loop thread could be started if the "Carbon" or "Cocoa" environments were activated in OpenMCL. New windows could be created, then this thread could be notified to begin servicing the windows as part of its event loop. I'm guessing this is the approach MCL uses but of course have no way of knowing.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Does anyone have any comments (or dire warnings) about either of these approaches?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-Brent</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV></BODY></HTML>