On 22 Jan 2014, at 7:05 , Eliot Miranda eliot.miranda@gmail.com wrote:
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
StackInterpreterSimulator>>ioGetNextEvent: evtBuf
eventQueue isEmpty ifTrue: [^self primitiveFail].
self convertMorphicEvent: eventQueue removeFirst into: evtBuf
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. Make sure you get WindowEvent type 6 correct! :)
Cheers, Henry