3538
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2008 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
"{ Package: 'stx:libwidg2' }"
|
|
13 |
|
5304
|
14 |
"{ NameSpace: Smalltalk }"
|
|
15 |
|
3538
|
16 |
ActivityNotification subclass:#ProgressNotification
|
5318
|
17 |
instanceVariableNames:'statusInfo'
|
3538
|
18 |
classVariableNames:''
|
|
19 |
poolDictionaries:''
|
|
20 |
category:'Kernel-Exceptions-Notifications'
|
|
21 |
!
|
|
22 |
|
|
23 |
!ProgressNotification class methodsFor:'documentation'!
|
|
24 |
|
|
25 |
copyright
|
|
26 |
"
|
|
27 |
COPYRIGHT (c) 2008 by eXept Software AG
|
|
28 |
All Rights Reserved
|
|
29 |
|
|
30 |
This software is furnished under a license and may be used
|
|
31 |
only in accordance with the terms of that license and with the
|
|
32 |
inclusion of the above copyright notice. This software may not
|
|
33 |
be provided or otherwise made available to, or used by, any
|
|
34 |
other person. No title to or ownership of the software is
|
|
35 |
hereby transferred.
|
|
36 |
"
|
5318
|
37 |
!
|
|
38 |
|
|
39 |
documentation
|
|
40 |
"
|
|
41 |
This should be used in long-going activites to tell the caller about any
|
|
42 |
progress (percentage).
|
|
43 |
Being a notification, it will be ignored if no one is interested.
|
|
44 |
If someone is interested, the caller may present this information as a progress-bar,
|
|
45 |
percentage display or whatever is useful in the UI.
|
|
46 |
Examples are:
|
|
47 |
http-requests, ftp requests, long lint checks etc.
|
|
48 |
|
|
49 |
See examples on how this is used by searching for references to me.
|
|
50 |
"
|
3538
|
51 |
! !
|
|
52 |
|
4157
|
53 |
!ProgressNotification class methodsFor:'notification'!
|
3539
|
54 |
|
4138
|
55 |
notify: message progress: progress
|
4157
|
56 |
^ self new
|
4138
|
57 |
messageText: message;
|
|
58 |
parameter: progress;
|
|
59 |
raiseRequest
|
|
60 |
|
|
61 |
"Created: / 31-07-2012 / 16:13:54 / cg"
|
|
62 |
!
|
|
63 |
|
3539
|
64 |
progressPercentage:aPercentageNumber
|
3541
|
65 |
self raiseRequestWith:aPercentageNumber
|
3539
|
66 |
! !
|
|
67 |
|
5304
|
68 |
!ProgressNotification methodsFor:'accessing'!
|
3539
|
69 |
|
|
70 |
progressValue
|
|
71 |
^ parameter
|
5318
|
72 |
!
|
|
73 |
|
|
74 |
statusInfo
|
|
75 |
"any additional info (opaque to me)"
|
|
76 |
|
|
77 |
^ statusInfo
|
|
78 |
!
|
|
79 |
|
|
80 |
statusInfo:something
|
|
81 |
"any additional info (opaque to me)"
|
|
82 |
|
|
83 |
statusInfo := something.
|
3539
|
84 |
! !
|
|
85 |
|
3538
|
86 |
!ProgressNotification class methodsFor:'documentation'!
|
|
87 |
|
|
88 |
version
|
5304
|
89 |
^ '$Header$'
|
3538
|
90 |
! !
|
5304
|
91 |
|