[squeak-dev] The Trunk: Morphic-mt.1674.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Fri Aug 14 11:51:42 UTC 2020


Hi all!

I backported the fix to 5.3, 5.2, and 5.1.

Best,
Marcel
Am 14.08.2020 13:35:45 schrieb commits at source.squeak.org <commits at source.squeak.org>:
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1674.mcz

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

Name: Morphic-mt.1674
Author: mt
Time: 14 August 2020, 1:35:28.120535 pm
UUID: 9b6b3a33-4993-437b-b180-606d9be16223
Ancestors: Morphic-mt.1673

Fixes test12CustomEventDispatcher as reported:

- https://smalltalk.tech.blog/2020/08/10/smalltalks-successor/
- http://forum.world.st/A-Sad-Day-tp5120519.html

This also increases the robustess when loading code that overrides #processEvent: or #processEvent:using: without returning an event object but self.

=============== Diff against Morphic-mt.1673 ===============

Item was changed:
----- Method: MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: (in category 'support') -----
dispatchEvent: anEvent toSubmorphsOf: aMorph
"Dispatch the given event to the submorphs of the given morph. For coordinate transformations, work only with copies. Either return the given event or a copy of any filtered event to employ immutability to some extent. --- PRIVATE!!"

| localEvent filteredEvent |
aMorph submorphsDo: [:child |
localEvent := anEvent transformedBy: (child transformedFrom: aMorph).
+ filteredEvent := child processEvent: localEvent.
+ filteredEvent == #rejected ifFalse: [ "some event or #rejected symbol or any other object"
+ filteredEvent isMorphicEvent ifFalse: [filteredEvent := localEvent].
- filteredEvent := child
- processEvent: localEvent
- using: self. "use same dispatcher"
- filteredEvent == #rejected ifFalse: [ "some event or #rejected symbol"
self flag: #overlappingChildren. "mt: We cannot give two overlapping siblings the chance to handle the event!!"
^ self nextFromOriginal: anEvent local: localEvent filtered: filteredEvent]].

^ #rejected!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200814/db9e8580/attachment.html>


More information about the Squeak-dev mailing list