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