changed: #showProgressOf:
authorClaus Gittinger <cg@exept.de>
Mon, 12 Sep 2011 10:21:08 +0200
changeset 4077 221b121afa23
parent 4076 1fea56567638
child 4078 91d764cf9cbd
changed: #showProgressOf: handle abort
ProgressIndicator.st
--- a/ProgressIndicator.st	Thu Sep 08 05:29:28 2011 +0200
+++ b/ProgressIndicator.st	Mon Sep 12 10:21:08 2011 +0200
@@ -1313,9 +1313,10 @@
 
      Caveat: cannot (currently) suppress close of the box ..."
 
-    |progressValue labelValue p|
+    |progressValue labelValue p aborted|
 
     progressValue := 0 asValue.
+    aborted := false.
 
     connectedLabel notNil ifTrue:[
         labelValue := (connectedLabel label ? '') asValue.
@@ -1327,7 +1328,6 @@
         labelValue := '' asValue.
     ].
 
-
     self model:progressValue.
 
     "/ the worker process
@@ -1337,7 +1337,11 @@
             WindowGroup windowGroupQuerySignal handle:[:ex |
                 ex proceedWith:self topView windowGroup
             ] do:[
-                aBlock value:progressValue value:labelValue
+                AbortSignal handle:[:ex |
+                    aborted := true
+                ] do:[
+                    aBlock value:progressValue value:labelValue
+                ]
             ]
         ] ensure:[
             p := nil.
@@ -1355,6 +1359,9 @@
             self topView show.
         ].
     p notNil ifTrue:[p terminate].
+    aborted ifTrue:[
+        AbortSignal raiseRequest
+    ].
 
     "
       |p|
@@ -1381,15 +1388,15 @@
 
     "
 
-    "Modified: / 20-08-2011 / 18:50:50 / cg"
+    "Modified: / 12-09-2011 / 09:57:03 / cg"
 ! !
 
 !ProgressIndicator class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.65 2011-08-20 17:07:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.66 2011-09-12 08:21:08 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.65 2011-08-20 17:07:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.66 2011-09-12 08:21:08 cg Exp $'
 ! !