--- a/ProgressNotification.st Tue Mar 06 17:41:34 2018 +0100
+++ b/ProgressNotification.st Tue Mar 06 19:41:48 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2008 by eXept Software AG
All Rights Reserved
@@ -46,16 +48,26 @@
Examples are:
http-requests, ftp requests, long lint checks etc.
- See examples on how this is used by searching for references to me.
+ See examples (look for references to this class) on how this is used.
+
+ ProgressNotification handle:[:ex |
+ Transcript showCR:(ex progressValue rounded).
+ ex proceed.
+ ] do:[
+ #(0 1 2 3 4 5 6 6 7 8 9)
+ do:[:i| Delay waitForMilliseconds: 50]
+ displayingProgress: 'Progress'
+ ].
+
"
! !
!ProgressNotification class methodsFor:'notification'!
-notify: message progress: progress
+notify:message progress:aPercentageNumber
^ self new
messageText: message;
- parameter: progress;
+ parameter: aPercentageNumber;
raiseRequest
"Created: / 31-07-2012 / 16:13:54 / cg"
@@ -65,7 +77,6 @@
^ self basicNew
raiseRequestWith:aPercentageNumber
in:thisContext sender
- "/ self raiseRequestWith:aPercentageNumber
"Modified: / 23-02-2017 / 16:51:52 / cg"
!
@@ -75,7 +86,6 @@
statusInfo:statusInfo;
raiseRequestWith:aPercentageNumber
in:thisContext sender
- "/ self raiseRequestWith:aPercentageNumber
"Created: / 23-02-2017 / 16:52:11 / cg"
! !
@@ -83,6 +93,9 @@
!ProgressNotification methodsFor:'accessing'!
progressValue
+ "answer the parameter that was passed to the notification requrest
+ as percentage parameter"
+
^ parameter
!