The Trunk: EToys-mt.423.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: EToys-mt.423.mcz

commits-2
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.423.mcz

==================== Summary ====================

Name: EToys-mt.423
Author: mt
Time: 18 February 2021, 4:13:47.008082 pm
UUID: ce09c0e8-7fc5-ba41-95c8-0dd8a987d38e
Ancestors: EToys-mt.422

Support CompiledBlock in error reports. Merges forgotten fix from Etoys 5 to make StandardViewer >> #addHeaderMorphWithBarHeight:includeDismissButton: work again, in case you got costumes.

=============== Diff against EToys-mt.422 ===============

Item was changed:
  ----- Method: AlignmentMorph>>addUpDownArrowsFor: (in category '*Etoys-initialization') -----
  addUpDownArrowsFor: aMorph
  "Add a column of up and down arrows that serve to send upArrowHit and downArrowHit to aMorph when they're pressed/held down"
 
+ | downArrow upArrow |
+ (TileMorph addArrowsOn: self)
+ in: [:array |
+ upArrow := array first.
+ downArrow := array second].
- | holder downArrow upArrow |
- holder := Morph new extent: 16 @ 16; beTransparent.
- downArrow := ImageMorph new image: (ScriptingSystem formAtKey: 'DownArrow').
- upArrow := ImageMorph new image: (ScriptingSystem formAtKey: 'UpArrow').
- upArrow position: holder bounds topLeft + (2 @ 2).
- downArrow align: downArrow bottomLeft
- with: holder topLeft + (0 @ TileMorph defaultH) + (2 @ -2).
- holder addMorph: upArrow.
- holder addMorph: downArrow.
- self addMorphBack: holder.
  upArrow on: #mouseDown send: #upArrowHit to: aMorph.
  upArrow on: #mouseStillDown send: #upArrowHit to: aMorph.
  downArrow on: #mouseDown send: #downArrowHit to: aMorph.
  downArrow on: #mouseStillDown send: #downArrowHit to: aMorph.!

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 "aCompiledBlock" method setClass: [:c | mclass := c].
- 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: [
  "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!