The Trunk: Morphic-mt.1674.mcz

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

The Trunk: Morphic-mt.1674.mcz

commits-2
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!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1674.mcz

marcel.taeumel
Hi all!

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

Best,
Marcel

Am 14.08.2020 13:35:45 schrieb [hidden email] <[hidden email]>:

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!




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1674.mcz

Jakob Reschke
Actually that blog post or the complaining comment by Stephen Pope do not mention this issue at all. The comment criticizes the hugeness of the class library and the naming of categories. Though I'd attribute most of the concrete points about "bloat" to Pharo and the remaining is Morphic.


Marcel Taeumel <[hidden email]> schrieb am Fr., 14. Aug. 2020, 13:52:
Hi all!

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

Best,
Marcel

Am 14.08.2020 13:35:45 schrieb [hidden email] <[hidden email]>:

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!