[squeak-dev] EventSensor>processEvent: has bogus code

tim Rowledge tim at rowledge.org
Fri Mar 1 23:54:24 UTC 2013


I'm trawling around in the bowels of Scratch and spotted some ugly soreta-event code. I've checked a nice recent image and although the ugly is different it still seems to be there in spirit at least. Same basic code is in Cuis as well - EventSensor>processSensorEvent:

For a while now - about a decade I'd think - the VMs have *not* reported the use of the set interrupt key (which is *still* set to cmd-.  Mac style and not to a platform suited value except on RISC OS) as a keyboard event. Thus the clause in EventSensor>processEvent: where 
"	type = EventTypeKeyboard
		ifTrue: [ "Check if the event is a user interrupt"
			((evt at: 4) = 0
				and: [((evt at: 3)
						bitOr: (((evt at: 5)
							bitAnd: 8)
							bitShift: 8))
							= interruptKey])
					ifTrue: ["interrupt key is meta - not reported as event"
							^ interruptSemaphore signal].

"
does the testing is bogus. It even has a comment explaining why it is bogus.

Unless I'm missing things (it's Friday afternoon ok?) this clause really ought to be removed.

And really - we still have all those long obsolete io prims called in there too? Oh my. You can just about excuse the VMs having the code to support ancient images, but not modern images.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Fractured Idiom:- RIGOR MORRIS - The cat is dead




More information about the Squeak-dev mailing list