Eliot Miranda uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-eem.288.mcz
==================== Summary ====================
Name: EToys-eem.288 Author: eem Time: 30 March 2017, 1:00:57.646171 pm UUID: 34cc818f-f554-4177-b1f5-cbdde48a1882 Ancestors: EToys-eem.287
Eliminate an explicit reference to MethodContext and correct the intent, which was to look for a method activation. With closures we use a single context cass (methodCOntxt, soon to be names Context) to execute both blocks and methods. Use the more popular sExecutingBlock to determine which.
=============== Diff against EToys-eem.287 ===============
Item was changed: ----- Method: StandardScriptingSystem>>reportToUser: (in category '*Etoys-utilities') ----- reportToUser: aString "Make a message accessible to the user. "
| trigger current baseTriggerer topTriggerer mclass sel topSelector | trigger := Player compiledMethodAt: #triggerScript:. current := thisContext. baseTriggerer := nil. topTriggerer := nil. [current notNil] whileTrue: [ topTriggerer ifNil: [ current receiver class isUniClass ifTrue: [ "Look for the top-most uniclass script in the call chain." sel := current receiver class selectorAtMethod: current method setClass: [:c | mclass := c]. mclass = current receiver class ifTrue: [ topTriggerer := current. topSelector := sel. ]. ]. ]. + (current method = trigger and: [current isExecutingBlock not]) ifTrue: [ - (current method = trigger and: [current class == MethodContext]) ifTrue: [ "Look for the bottom-most #triggerScript: and its selector." baseTriggerer := current ]. current := current sender. ]. baseTriggerer ifNotNil: [ (baseTriggerer receiver scriptInstantiationForSelector: (baseTriggerer at: 1)) resetTo: #paused ifCurrently: #ticking. ]. (topTriggerer notNil and: [topSelector notNil]) ifTrue: [ ^ self eToysError: aString, '', topTriggerer receiver knownName, '', topSelector. ]. + self error: aString! - self error: aString. - !
packages@lists.squeakfoundation.org