<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>I have some questions on how to proceed at the bottom of this post.<br><br>In the host simulation environment, one cannot interact with the running simulation using the standard Morphic "event chain".<br><br>One cannot do so because from the host environment, there is no World in the simulation; there is only a painted picture of a World.<br>The key to seeing this&nbsp; is to grok&nbsp; what a running simulation actually is. <br><br><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><br>StackInterpreterSimulator &gt;&gt; run<br><br>&nbsp;&nbsp;&nbsp; "..simulation setup code.."<br><br>&nbsp;&nbsp;&nbsp; [true] whileTrue:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [self assertValidExecutionPointers.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;atEachStepBlock value. "N.B. may be nil"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;self dispatchOn: currentBytecode in: BytecodeTable.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;self incrementByteCount].<br><br>&nbsp;&nbsp;&nbsp; "..we never get here..."</div></blockquote> <br><br><br>There is no 'hook' for me to chain the Morphic event's down into, there  are only bytecodes being fetched and executed . &nbsp;&nbsp; (which is totally cool and awesome, btw).<br><br>Those bytecodes paint a pretty picture on an ImageMorph placed on a Frame placed within a SystemWindow as seen here in <br><br><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div>StackInterpreterSimulater &gt;&gt; openAsMorph<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "...."<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; window addMorph: (displayView := ImageMorph new image: displayForm)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; frame: (0@0 corner: 1@0.8).<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "...."<br></div></blockquote> <br><br>That image is not a PasteUpMorph named TheWorld that can respond to events--it is just a pretty picture.<br><br><br>&nbsp;That ladies and gentleman is the point where us fat and coddled coder Hobbit's have to enter the dragon's cave, leaving the<br>comfortable environment of the Squeak API for whatever strange and dangerous world lies below; Me? I decided to post here instead<br>before venturing in (:<br><br>So, having learned this the hard way, there are a couple of strategies I could take--RFB, or maybe Nebraska-- to get events over to<br>the target image but before doing that I have to ask is it really necessary? <br><br>My goal is to port the StackInterpeter to native 64 (and after that 64x64). Presumably Eliot managed to do the original work without the<br>use of direct interaction with morphic on the running world, so shouldn't my task now be to emulate whatever techiques Eliot uses?<br><br>If so, that raises the final point. What exactly are those techniques? Specifically, given a running simulation, how does one produce<br>a new VM? Do we boot up the target image on which we have developed and run VMMaker the standard way?<br><br><br>Finally, direct interaction with the runnig simulation world is desirable, I will be happy to implement it. Just please inform me of what strategy you would prefer and I<br>will try to get it done.<br><br>Thank you for your time.<br><br></div></body></html>