#QUALITY by cg
class: WindowGroup
changed:
#executePostEventHooksFor:
#executePreEventHooksFor:
enumerate hooks in a copy
(in case someone adds/removes hooks inside)
--- a/WindowGroup.st Sun Jul 22 22:35:27 2018 +0200
+++ b/WindowGroup.st Thu Jul 26 22:35:39 2018 +0200
@@ -1583,7 +1583,7 @@
postEventHook processEvent:anEvent
].
postEventHooks notNil ifTrue:[
- postEventHooks do:[:eachHook |
+ postEventHooks copy do:[:eachHook |
eachHook isBlock ifTrue:[
eachHook value:anEvent
] ifFalse:[
@@ -1591,6 +1591,8 @@
]
]
].
+
+ "Modified: / 26-07-2018 / 22:35:02 / Claus Gittinger"
!
executePreEventHooksFor:anEvent
@@ -1604,7 +1606,7 @@
(preEventHook processEvent:anEvent) ifTrue:[ ^ true ].
].
preEventHooks notNil ifTrue:[
- preEventHooks do:[:eachHook |
+ preEventHooks copy do:[:eachHook |
"/ can only be nil if changed, while enumerating...
eachHook notNil ifTrue:[
eachHook isBlock ifTrue:[
@@ -1618,6 +1620,7 @@
^ false
"Modified: / 28-07-2010 / 03:34:33 / cg"
+ "Modified: / 26-07-2018 / 22:34:28 / Claus Gittinger"
!
lastEvent