<!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;'>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><br><br>cordially,<br><br><br>tty<br><div id="1"><br>---- On Thu, 23 Jan 2014 03:32:32 -0800 <b>Bob Arning <arning315@comcast.net></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 cite="mid:F04A55<a href=" mailto:31-9aab-46f2-be03-164f3c2c6759@veloxit.no"="" target="_blank">31-9AAB-46F2-BE03-164F3C2C6759@veloxit.no" type="cite"> <pre wrap=""> </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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> <div>StackInterpreterSimulator>>ioGetNextEvent: evtBuf</div> <div><br> </div> <div><span style="white-space: pre;"> 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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="white-space: pre;"> <div style="white-space: normal;"><span style="white-space: pre;"> </span><span style="white-space: pre;"> [^</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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="white-space: pre;"> 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></body></html>