author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 13 Jun 2018 14:39:23 +0000 | |
branch | jv |
changeset 23108 | 77cd6e1625e1 |
parent 18120 | e3a375d5f6a8 |
permissions | -rw-r--r-- |
4549 | 1 |
" |
2 |
COPYRIGHT (c) 1999 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 |
" |
|
6206 | 12 |
"{ Package: 'stx:libbasic' }" |
13 |
||
12278
992ca2a1e9a6
inheritance changed: Notification handle... will now also handle
Claus Gittinger <cg@exept.de>
parents:
11615
diff
changeset
|
14 |
Notification subclass:#UserNotification |
4549 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
11198 | 18 |
category:'Kernel-Exceptions-Notifications' |
4549 | 19 |
! |
20 |
||
21 |
!UserNotification class methodsFor:'documentation'! |
|
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
||
36 |
! |
|
37 |
||
38 |
documentation |
|
39 |
" |
|
7038 | 40 |
UserNotification is the superclass of all user notification |
12278
992ca2a1e9a6
inheritance changed: Notification handle... will now also handle
Claus Gittinger <cg@exept.de>
parents:
11615
diff
changeset
|
41 |
signals in the system. It produces an info box with the message on the screen. |
11198 | 42 |
If no display is available, the message is written to the Transcript (headless operation). |
4549 | 43 |
|
44 |
[author:] |
|
45 |
Stefan Vogel |
|
46 |
||
47 |
[see also:] |
|
48 |
Signal |
|
49 |
" |
|
50 |
! |
|
51 |
||
52 |
examples |
|
53 |
" |
|
54 |
[exBegin] |
|
55 |
UserNotification raiseRequest |
|
56 |
[exEnd] |
|
4554 | 57 |
|
58 |
[exBegin] |
|
10814 | 59 |
UserNotification raiseErrorString:'huh ?' |
60 |
[exEnd] |
|
61 |
||
62 |
[exBegin] |
|
4554 | 63 |
UserNotification raiseRequestWith:nil errorString:'what ?' |
64 |
[exEnd] |
|
65 |
||
66 |
[exBegin] |
|
67 |
UserNotification raiseRequestWith:nil errorString:' what ?' |
|
68 |
[exEnd] |
|
4549 | 69 |
" |
70 |
! ! |
|
71 |
||
72 |
!UserNotification class methodsFor:'initialization'! |
|
73 |
||
74 |
initialize |
|
75 |
||
76 |
NotifierString := 'User Notification:'. |
|
77 |
||
78 |
" |
|
79 |
self initialize |
|
80 |
" |
|
81 |
||
82 |
"Created: / 23.7.1999 / 15:31:44 / stefan" |
|
83 |
! ! |
|
84 |
||
10823 | 85 |
!UserNotification class methodsFor:'notification'! |
86 |
||
87 |
notify:aString |
|
14554 | 88 |
self raiseRequestErrorString:aString |
14270 | 89 |
! |
90 |
||
14554 | 91 |
notify:message progress:progress |
92 |
^ ProgressNotification notify:message progress:progress |
|
14270 | 93 |
|
94 |
"Created: / 31-07-2012 / 15:18:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10823 | 95 |
! ! |
96 |
||
4549 | 97 |
!UserNotification methodsFor:'default actions'! |
98 |
||
99 |
defaultAction |
|
5295 | 100 |
"Default action for notifications: open a info box with description" |
4549 | 101 |
|
16424 | 102 |
self showInformationDialog. |
103 |
self proceed. |
|
104 |
||
105 |
" |
|
106 |
UserNotification raiseRequestErrorString:' abc' |
|
107 |
" |
|
108 |
||
109 |
"Modified: / 3.8.1999 / 14:06:55 / stefan" |
|
110 |
! |
|
111 |
||
112 |
showInformationDialog |
|
113 |
"open a info box with description" |
|
114 |
||
4549 | 115 |
|text| |
116 |
||
5295 | 117 |
text := self description. |
4549 | 118 |
|
10516 | 119 |
self hasDialog ifTrue:[ |
7032
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
120 |
Dialog information:text. |
4549 | 121 |
] ifFalse:[ |
122 |
" |
|
123 |
on systems without GUI, simply show |
|
124 |
the message on the Transcript. |
|
125 |
" |
|
7032
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
126 |
Transcript show:'notification: '; showCR:text. |
4549 | 127 |
]. |
128 |
||
129 |
" |
|
7032
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
130 |
UserNotification raiseRequestErrorString:' abc' |
4549 | 131 |
" |
132 |
||
133 |
"Modified: / 3.8.1999 / 14:06:55 / stefan" |
|
134 |
! ! |
|
135 |
||
136 |
!UserNotification class methodsFor:'documentation'! |
|
137 |
||
138 |
version |
|
16424 | 139 |
^ '$Header: /cvs/stx/stx/libbasic/UserNotification.st,v 1.19 2014-05-13 22:10:03 cg Exp $' |
12278
992ca2a1e9a6
inheritance changed: Notification handle... will now also handle
Claus Gittinger <cg@exept.de>
parents:
11615
diff
changeset
|
140 |
! |
992ca2a1e9a6
inheritance changed: Notification handle... will now also handle
Claus Gittinger <cg@exept.de>
parents:
11615
diff
changeset
|
141 |
|
992ca2a1e9a6
inheritance changed: Notification handle... will now also handle
Claus Gittinger <cg@exept.de>
parents:
11615
diff
changeset
|
142 |
version_CVS |
16424 | 143 |
^ '$Header: /cvs/stx/stx/libbasic/UserNotification.st,v 1.19 2014-05-13 22:10:03 cg Exp $' |
4549 | 144 |
! ! |
7032
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
145 |
|
14949 | 146 |
|
4549 | 147 |
UserNotification initialize! |