ProgressIndicator.st
changeset 2931 74fc63bea835
parent 2921 1e8c394e895e
child 3425 20459e327062
--- a/ProgressIndicator.st	Mon Mar 06 09:46:21 2006 +0100
+++ b/ProgressIndicator.st	Mon Mar 06 09:55:21 2006 +0100
@@ -405,8 +405,7 @@
 
     p showBusyIndication:true.
     p showBusyIndicatorDuring:[
-        CannotReturnError handle:[:ex |
-        ] do:[
+        CannotReturnError catch:[
             aBlock value.    
         ]
     ]
@@ -433,52 +432,51 @@
     |p|
 
     p := self
-	    inBoxWithLabel:aLabel 
-	    icon:nil
-	    text:aLabel
-	    abortable:false
-	    view:nil
-	    closeWhenDone:true.
+            inBoxWithLabel:aLabel 
+            icon:nil
+            text:aLabel
+            abortable:false
+            view:nil
+            closeWhenDone:true.
 
     p showProgressOf:[:progressValue :currentAction |
-	|scaler|
+        |scaler|
 
-	scaler := [:scaledValue | 
-			|newPercentage oldPercentage oldLabel|
+        scaler := [:scaledValue | 
+                        |newPercentage oldPercentage oldLabel|
 
-			scaledValue isNil ifTrue:[
-			    p showBusyIndication:true
-			] ifFalse:[
-			    p showBusyIndication:false.
-			    oldPercentage := progressValue value.
-			    newPercentage := (scaledValue - startValue) / (endValue-startValue) * 100.
-			    newPercentage ~= oldPercentage ifTrue:[
-				progressValue value:newPercentage.
-			    ].
-			    oldLabel := currentAction value.
-			    oldLabel ~= aLabel ifTrue:[
-				currentAction value:aLabel.
-			    ]
-			]
-		  ].
-	CannotReturnError handle:[:ex |
-	] do:[
-	    aBlock value:scaler.    
-	]
+                        scaledValue isNil ifTrue:[
+                            p showBusyIndication:true
+                        ] ifFalse:[
+                            p showBusyIndication:false.
+                            oldPercentage := progressValue value.
+                            newPercentage := (scaledValue - startValue) / (endValue-startValue) * 100.
+                            newPercentage ~= oldPercentage ifTrue:[
+                                progressValue value:newPercentage.
+                            ].
+                            oldLabel := currentAction value.
+                            oldLabel ~= aLabel ifTrue:[
+                                currentAction value:aLabel.
+                            ]
+                        ]
+                  ].
+        CannotReturnError catch:[
+            aBlock value:scaler.    
+        ]
     ]
 
     "
      ProgressIndicator
-	displayProgress:'doobidoobidoo...'
-	at:(Screen default center)
-	from:200
-	to:400
-	during:[:val |
-	    200 to:400 by:5 do:[:i |
-		val value:i.
-		Delay waitForSeconds:0.1.
-	    ]
-	].
+        displayProgress:'doobidoobidoo...'
+        at:(Screen default center)
+        from:200
+        to:400
+        during:[:val |
+            200 to:400 by:5 do:[:i |
+                val value:i.
+                Delay waitForSeconds:0.1.
+            ]
+        ].
     "
 !
 
@@ -1135,5 +1133,5 @@
 !ProgressIndicator class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.51 2006-02-22 15:00:13 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.52 2006-03-06 08:55:21 cg Exp $'
 ! !