--- a/DialogBox.st Tue Sep 24 15:21:58 2002 +0200
+++ b/DialogBox.st Mon Sep 30 15:19:07 2002 +0200
@@ -1165,6 +1165,33 @@
"
!
+informUser:aString during:aBlock cancel:canCancel
+ "show a message-box while executing aBlock"
+
+ |box subProcess|
+
+ box := InfoBox title:aString.
+ canCancel ifTrue:[
+ box okText:(ClassResources string:'Abort').
+ ] ifFalse:[
+ box hideButtons.
+ ].
+
+ subProcess := [
+ aBlock ensure:[box destroy]
+ ] forkAt:(Processor activePriority - 1).
+
+ self showBox:box.
+ subProcess terminate.
+
+
+ "
+ Dialog informUser:'don''t wait ...' during:[true] cancel:true
+ Dialog informUser:'wait a second...' during:[Delay waitForSeconds:1] cancel:true
+ Dialog informUser:'wait a few seconds...' during:[10000 factorial] cancel:true
+ "
+!
+
information:aString
"launch a Dialog to tell user something"
@@ -7569,7 +7596,7 @@
!DialogBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.197 2002-09-24 13:21:58 penk Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.198 2002-09-30 13:19:07 stefan Exp $'
! !
DialogBox initialize!