The Trunk: Morphic-mt.1754.mcz

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

The Trunk: Morphic-mt.1754.mcz

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

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

Name: Morphic-mt.1754
Author: mt
Time: 17 April 2021, 2:33:21.323481 pm
UUID: 5fa87166-5835-1545-910d-74cd9d19c630
Ancestors: Morphic-mt.1753

For event filters, dispatch #ignore through the event's current hand as a way to inform that hand such as in test for logging, which helps debugging and understanding the flow of events.

=============== Diff against Morphic-mt.1753 ===============

Item was added:
+ ----- Method: HandMorph>>ignoreEvent: (in category 'events-filtering') -----
+ ignoreEvent: anEvent
+ "Double dispatch from MorphicEvent >> #ignore: to let custom hands tweak this behavior such as logging it."
+
+ anEvent wasIgnored: true.!

Item was changed:
  ----- Method: MorphicEvent>>ignore (in category 'dispatching') -----
  ignore
 
+ source ignoreEvent: self.!
- self wasIgnored: true.!

Item was changed:
  ----- Method: ScrollPane>>filterEvent:for: (in category 'event filtering') -----
  filterEvent: aKeyboardEvent for: morphOrNil
  "See #initialize. This filter should be installed as keyboard event filter during the capture phase."
 
+ (aKeyboardEvent isKeystroke
+ and: [self scrollByKeyboard: aKeyboardEvent])
+ ifTrue: [aKeyboardEvent ignore].
- aKeyboardEvent isKeystroke
- ifFalse: [^ aKeyboardEvent].
 
+ ^ aKeyboardEvent!
- ^ aKeyboardEvent
- wasIgnored: (self scrollByKeyboard: aKeyboardEvent);
- yourself!