'From Vancouver1.0 of 29 September 2004 [latest update: #311] on 20 October 2004 at 5:10:32 pm'! "Change Set: lostEventsEToys-ar Date: 20 October 2004 Author: Andreas Raab & Ted Kaehler Fixes the bug that makes mouseUp events get lost in any EToy system that has a buttonUp tile (or buttonDown, noButtonPressed). This made Wandering Letters be unusable. Sensor anyButtonPressed and Sensor noButtonPressed consume all events that are waiting in the queue. They should NEVER be used unless you really want to zap all waiting events. Use ActiveHand anyButtonPressed and ActiveHand noButtonPressed instead. This fixes any EToy tiles in new scripts."! !HandMorph methodsFor: 'accessing' stamp: 'tk 10/20/2004 15:54'! anyButtonPressed ^lastMouseEvent anyButtonPressed! ! !HandMorph methodsFor: 'accessing' stamp: 'tk 10/20/2004 15:54'! noButtonPressed "Answer whether any mouse button is not being pressed." ^self anyButtonPressed not! ! !StandardScriptingSystem methodsFor: 'parts bin' stamp: 'tk 10/20/2004 15:52'! anyButtonPressedTiles "Answer tiles representing the query 'is any button pressed?'" ^ self tilesForQuery: '(ActiveHand anyButtonPressed)' label: 'button down?' translated! ! !StandardScriptingSystem methodsFor: 'parts bin' stamp: 'sw 11/16/2004 13:56'! noButtonPressedTiles "Answer tiles representing the query 'is no button pressed?'" ^ self tilesForQuery: '(ActiveHand noButtonPressed)' label: 'button up?' translated! ! !StandardScriptingSystem methodsFor: 'utilities' stamp: 'tk 10/20/2004 15:52'! buttonDownTile "Answer a boolean-valued tile which reports whether the button is down" ^ self systemQueryPhraseWithActionString: '(ActiveHand anyButtonPressed)' labelled: 'button down?' translated! ! !StandardScriptingSystem methodsFor: 'utilities' stamp: 'tk 10/20/2004 15:52'! buttonUpTile "Answer a boolean-valued tile which reports whether the button is up" ^ self systemQueryPhraseWithActionString: '(ActiveHand noButtonPressed)' labelled: 'button up?' translated! ! "Postscript: Fix tiles in place, and recompile their scripts." BooleanTile allInstancesDo: [:aTile | aTile operatorOrExpression = '(Sensor anyButtonPressed)' ifTrue: [ aTile setExpression: '(ActiveHand anyButtonPressed)' label: aTile labelMorph contents. aTile scriptEdited]. aTile operatorOrExpression = '(Sensor noButtonPressed)' ifTrue: [ aTile setExpression: '(ActiveHand noButtonPressed)' label: aTile labelMorph contents. aTile scriptEdited]]. !