#BUGFIX by stefan
class: WindowGroup
changed:
#eventLoop
#eventLoopWhile:onLeave:
#startupModal:forGroup:
#startupWith:
Fix DNU "true whileTrue:[...]" and "[...] ensure:nil"
(did work only in STC compile code)
--- a/WindowGroup.st Thu Feb 15 15:58:49 2018 +0100
+++ b/WindowGroup.st Thu Feb 15 19:19:39 2018 +0100
@@ -1125,7 +1125,7 @@
].
[
self realizeTopViews.
- self eventLoopWhile:checkBlock onLeave:nil
+ self eventLoopWhile:checkBlock onLeave:[]
] ensure:[
mainGroup notNil ifTrue:[
"/ tell the other group, that some modal dialog has closed down.
@@ -1165,7 +1165,7 @@
"Created: / 10-12-1995 / 14:14:26 / cg"
"Modified: / 13-11-2016 / 17:19:16 / cg"
"Modified (format): / 14-11-2016 / 10:24:03 / cg"
- "Modified: / 17-03-2017 / 18:54:42 / stefan"
+ "Modified: / 15-02-2018 / 18:32:24 / stefan"
!
startupWith:startupAction
@@ -1193,7 +1193,7 @@
[
startupAction value.
self showWaitCursorWhenBusyForMillis:400.
- self eventLoopWhile:true onLeave:nil.
+ self eventLoopWhile:[true] onLeave:[].
] ensure:[
|dev w app|
@@ -1247,7 +1247,7 @@
"Created: / 24-07-1997 / 12:52:04 / cg"
"Modified: / 17-09-2007 / 10:59:34 / cg"
- "Modified: / 17-03-2017 / 16:58:40 / stefan"
+ "Modified: / 15-02-2018 / 18:29:11 / stefan"
!
unhideTopViews
@@ -1360,9 +1360,9 @@
"loop executed by windowGroup process;
wait-for and process events forever"
- self eventLoopWhile:true onLeave:nil
-
- "Modified: / 17-03-2017 / 18:53:47 / stefan"
+ self eventLoopWhile:[true] onLeave:[]
+
+ "Modified: / 15-02-2018 / 18:31:58 / stefan"
!
eventLoopWhile:aBlock onLeave:cleanupActions
@@ -1379,8 +1379,8 @@
|signalsToHandle|
signalsToHandle := SignalSet
- with:LeaveSignal
- with:ActivityNotification.
+ with:LeaveSignal
+ with:ActivityNotification.
(isModal not or:[AbortAllOperationRequest isHandled not]) ifTrue:[
signalsToHandle add:AbortAllOperationRequest
@@ -1391,7 +1391,7 @@
WindowGroupQuerySignal answer:self do:[
[
- |g s mainGroup mySema waitSema mainSema groupForSema|
+ |g mainGroup mySema waitSema mainSema groupForSema|
waitSema := mySema := mySensor eventSemaphore.
@@ -1416,14 +1416,17 @@
g := previousGroup.
g ~~ mainGroup ifTrue:[
groupForSema := IdentityDictionary new.
- [g ~~ mainGroup] whileTrue:[
+ [
+ |eventSema|
+
g sensor notNil ifTrue:[
- s := g sensor eventSemaphore.
- waitSema add:s.
- groupForSema at:s put:g.
+ eventSema := g sensor eventSemaphore.
+ waitSema add:eventSema.
+ groupForSema at:eventSema put:g.
].
g := g previousGroup.
- ]
+ g ~~ mainGroup
+ ] whileTrue.
].
].
@@ -1523,8 +1526,7 @@
"/ (we arrive here after we woke up on maingroup sensor eventSemaphore)
"/
groupForSema notNil ifTrue:[
- g := groupForSema at:gotSema ifAbsent:nil.
- g := g ? mainGroup.
+ g := groupForSema at:gotSema ifAbsent:mainGroup.
] ifFalse:[
g := mainGroup
].
@@ -1552,7 +1554,7 @@
]
"Modified: / 06-07-2010 / 11:47:27 / cg"
- "Modified: / 07-02-2017 / 12:36:30 / stefan"
+ "Modified (format): / 15-02-2018 / 18:17:03 / stefan"
!
executePostEventHooksFor:anEvent