<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 16, 2014 at 10:00 AM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>    more whitewash...<br><div class="gmail_extra"><br><div class="gmail_quote">
On Thu, Jan 16, 2014 at 9:41 AM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">

<div>On Thu, Jan 16, 2014 at 9:36 AM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Tty,<br><div class="gmail_extra"><br><br>

<div class="gmail_quote">On Thu, Jan 16, 2014 at 8:10 AM, gettimothy <span dir="ltr">&lt;<a href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br><u></u><div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif">

I am hosting (? correct term)  the StackInterpreterSimulator on Squeak4.5-13352.image running Cog. <br>

<br>I instruct the simulator to use a copy of that image that I have renamed to Squeak4.5.image.<br><br><br><blockquote style="border:1px solid rgb(204,204,204);padding:7px;background-color:rgb(245,245,245)"><div>| vm |<br>



Transcript clear.<br>vm := StackInterpreterSimulator newWithOptions: #().<br>vm openOn: &#39;home/tty/usr/src/smalltalk/buildCogDevelopmentImageCog.app/Contents/Resources/Squeak4.5.image&#39;.<br>vm <br>    openAsMorph; <br>



    toggleTranscript;<br>    halt;<br>    run<br></div></blockquote> <br>The simulation runs, but the simulated World does not respond to mouse clicks (the control panel of the Simulator works just fine).<br></div></div>


</blockquote>
<div><br></div><div>Right.  I&#39;ve not looked at this.  It never worked for me and I think its to do with the &quot;new&quot; event mechanism bssed around the interruptPending inst var.  So for now I use an image that has a read-eval-print-loop in it.  Much better would be for the input scheme to work.  But I&#39;ve not had time or occasion to look at the Interpreter and update StackInterpreterSimulator appropriately so it responds to input.</div>


</div></div></div></blockquote><div><br></div></div><div>Hmmm, looking at Interpreter in the VMMaker.oscog package I see that nothing in the simulator does set interruptPending.  David, does the trunk VMMaker package&#39;s InterpreterSimulator respond to input?</div>

</div></div></div></blockquote><div><br></div><div><br></div><div>I see that in the various FooSimulator&gt;&gt;openAsMorph methods the basic morph used to display the simulated Smalltalk image is an ImageMorph on the Smalltalk image&#39;s displayForm.  Looking at the event handling it looks like this bottoms out at methods like</div>

<div><br></div><div>Morph&gt;&gt;mouseDown: evt </div><div><span style="white-space:pre-wrap">        </span>&quot;Handle a mouse down event. The default response is to let my </div><div><span style="white-space:pre-wrap">        </span>eventHandler, if any, handle it.&quot;</div>

<div><span style="white-space:pre-wrap">        </span>evt yellowButtonPressed</div><div><span style="white-space:pre-wrap">                </span>ifTrue: [&quot;First check for option (menu) click&quot;</div><div><span style="white-space:pre-wrap">                        </span>^ self yellowButtonActivity: evt shiftPressed].</div>

<div><span style="white-space:pre-wrap">        </span>self eventHandler</div><div><span style="white-space:pre-wrap">                </span>ifNotNil: [self eventHandler mouseDown: evt fromMorph: self]</div><div><br></div><div><br></div>
<div>So it could be straight-forward to plum-in a suitably-written event handler (e.g. an object that wraps the FooSimulator so that it can be reused in each of the simulators, instead of using the simulator as the eventHandler itself).  Any volunteers?</div>
</div></div></div></div></blockquote><div><br></div><div>Ghaahhh, ignore my blathering.  I clearly don&#39;t understand how Morph event handling works.  Looks like it needs a set of on:send:do: messages sent to the Morph.  So if you do go for this please don&#39;t ask me for advice on the Morph side of things ;-)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote">
<div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">

<div class="gmail_extra"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif">I would like to rule out a missing option in the newWithOptions: #() line <br>
<br>Specifically the &quot;type of VM options in VMBasicConstants:<br><br>#COGMTVM <br>#COGVM <br>#NewspeakVM <br>#STACKVM <br>#VMBIGENDIAN<br><br>1. To my way of thinking, since I am running a StackInterpreterSimulator, passing the option #STACKVM makes no sense. <br>



2. Also--if I remember correctly--when first running Cog on a StackVM (?) image, it prompts the user that running Cog will make the image unusable for the StackInterpreter. <br>3. Therefore telling the StackIntepreterSimulator to expect a COGVM image makes no sense either.<br>



4. Equally perplexing is the fact that the simulation does run -- it is just stuck in idle--which tells me I am incorrect about 2. above.<br><br><br>I will be poking around in the guts of things in the mean time.<br><br>


<br>
thx<br><br>tty<br><br><br><br><br></div></div><br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</font></span></div></div>
</blockquote></div></div><span><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>best,<div>Eliot</div>
</font></span></font></span></div></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</font></span></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>