<div dir="ltr">Hi Tty,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 23, 2014 at 5:11 AM, gettimothy <span dir="ltr"><<a href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><u></u><div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif">Henry, Bob and Eliot.<br><br>
Thanks all.<br><br><br><br>After I study what Eliot wrote and devise my plan, I will post it back here. <br>Bear in mind that I am new to this. I am experiencing the same difficulty in thinking 'VM' vs 'Smalltalk' as I did when thinking 'Smalltalk' vs 'Algol';<br>
I am sure the light bulb will come on (40 Watt, sadly) eventually, but expect missteps.<br><br><br>BTW, is there an existing working process that the Simulator currently does that I can use as a model? I was planning on mapping what Eliot wrote to <br>
what I can see in the Simulator's command window menu as a starting point to get a feel for things. Good place to start ?<br></div></div></blockquote><div><br></div><div>Sure. But you're going to add event handler code to where that window is created which is StackInterpreterSimulator>>openAsMorph. You're going to need a new inst var in StackInterpreterSimulator to hold the event. As Bob says (wish I'd said it too but I couldn't find it) the Morphic events may hold onto their OS events anyway so you may not even have to convert.</div>
<div><br></div><div>Anyway, dive in, get your hands dirty, and you don't have to commit your mistakes, so we'll never know, only see the shiny finished product ;-)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif">cordially,<br><br><br>tty<br><div><br>---- On Thu, 23 Jan 2014 03:32:32 -0800 <b>Bob Arning <<a href="mailto:arning315@comcast.net" target="_blank">arning315@comcast.net</a>></b> wrote ---- <br>
</div><br><blockquote style="border-left:1px solid #0000ff;padding-left:6px;margin:0 0 0 5px"> <div text="#000000" bgcolor="#FFFFFF"> <font face="Georgia">I don't think there is any reason to convert to an OS array - HandMorph>>processEvents already knows the OS event array that was used to generate the squeak event. Making that accessible may be all you need from the front end.<br>
<br> Cheers,<br> Bob<br> <br> </font> <div>On 1/23/14 4:43 AM, Henrik Johansen wrote:<br> </div> <blockquote><a href="mailto:31-9AAB-46F2-BE03-164F3C2C6759@veloxit.no" target="_blank">31-9AAB-46F2-BE03-164F3C2C6759@veloxit.no</a>" type="cite"> <pre>
</pre> <br> <fieldset></fieldset> <br> <br> <div> <div>On 22 Jan 2014, at 7:05 , Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>> wrote:</div>
<br> <blockquote type="cite"> <div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
So your challenge is to take the Morphic event, queue it inside StackInterpreterSimulator (e.g. in a new inst var eventQueue), and convert it to an OS event (an Array), so that it can for example implement ioGetNextEvent: as something like</div>
<div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<br> </div> <div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div>StackInterpreterSimulator>>ioGetNextEvent: evtBuf</div> <div><br> </div> <div><span style="white-space:pre-wrap"> eventQueue isEmpty ifTrue:</span></div>
</div> <div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="white-space:pre-wrap"> <div style="white-space:normal"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> [^</span>self primitiveFail].</div> <div style="white-space:normal">
<br> </div> </span></div> <div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="white-space:pre-wrap"> self convertMorphicEvent: eventQueue removeFirst into: evtBuf</span></div> </blockquote> </div> <br> <div>As for the conversion into the OS array, searching for "Event Types” in sq.h will probably give a better introduction/faster understand as to the structure of said array than delving into the code doing array -> morphic event conversion in an image.</div>
<div>Make sure you get WindowEvent type 6 correct! :)</div> <div><br> </div> <div>Cheers,</div> <div>Henry</div> </blockquote> <br> </div></blockquote><br></div></div><br></blockquote>
</div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>