author | Stefan Vogel <sv@exept.de> |
Tue, 03 Aug 1999 14:08:07 +0200 | |
changeset 4508 | d64471bf34af |
parent 4500 | be0fe7e7e21b |
child 4525 | 999e680a29ca |
permissions | -rw-r--r-- |
4466
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
1 |
" |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
2 |
COPYRIGHT (c) 1999 by eXept Software AG |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
3 |
All Rights Reserved |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
4 |
|
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
5 |
This software is furnished under a license and may be used |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
10 |
hereby transferred. |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
11 |
" |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
12 |
|
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
13 |
|
4443 | 14 |
Exception subclass:#Notification |
15 |
instanceVariableNames:'' |
|
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'Kernel-Exceptions' |
|
19 |
! |
|
20 |
||
21 |
!Notification class methodsFor:'documentation'! |
|
22 |
||
4466
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
23 |
copyright |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
24 |
" |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
25 |
COPYRIGHT (c) 1999 by eXept Software AG |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
26 |
All Rights Reserved |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
27 |
|
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
28 |
This software is furnished under a license and may be used |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
29 |
only in accordance with the terms of that license and with the |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
30 |
inclusion of the above copyright notice. This software may not |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
31 |
be provided or otherwise made available to, or used by, any |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
32 |
other person. No title to or ownership of the software is |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
33 |
hereby transferred. |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
34 |
" |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
35 |
|
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
36 |
! |
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
37 |
|
4443 | 38 |
documentation |
39 |
" |
|
4466
9cba6f4ecec4
copyrights added; typo in docu
Claus Gittinger <cg@exept.de>
parents:
4443
diff
changeset
|
40 |
Notification is an abstract superclass of all notification |
4443 | 41 |
exceptions in the system |
42 |
||
43 |
[author:] |
|
44 |
Stefan Vogel |
|
45 |
||
46 |
[see also:] |
|
47 |
Signal |
|
48 |
" |
|
49 |
! |
|
50 |
||
51 |
examples |
|
52 |
" |
|
53 |
[exBegin] |
|
54 |
Notification raiseRequest |
|
55 |
[exEnd] |
|
56 |
" |
|
57 |
||
58 |
! ! |
|
59 |
||
60 |
!Notification class methodsFor:'initialization'! |
|
61 |
||
62 |
initialize |
|
63 |
||
64 |
NotifierString := 'Notification'. |
|
65 |
||
66 |
" |
|
67 |
self initialize |
|
68 |
" |
|
69 |
||
70 |
"Created: / 23.7.1999 / 15:31:44 / stefan" |
|
71 |
! ! |
|
72 |
||
73 |
!Notification methodsFor:'default actions'! |
|
74 |
||
75 |
action |
|
4500
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
76 |
"Default action for notifications: open a info box with errorString" |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
77 |
|
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
78 |
|text| |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
79 |
|
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
80 |
text := self errorString. |
4443 | 81 |
|
4500
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
82 |
(Smalltalk isInitialized and:[Dialog notNil]) ifTrue:[ |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
83 |
Dialog notify:text. |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
84 |
] ifFalse:[ |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
85 |
" |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
86 |
on systems without GUI, simply show |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
87 |
the message on the Transcript. |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
88 |
" |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
89 |
Transcript showCR:text. |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
90 |
]. |
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
91 |
self proceed. |
4443 | 92 |
|
93 |
||
94 |
" |
|
4500
be0fe7e7e21b
Write to transcript if Dialog is not available.
Stefan Vogel <sv@exept.de>
parents:
4466
diff
changeset
|
95 |
Notification raiseRequestWith:self errorString:' abc' |
4443 | 96 |
" |
97 |
||
4508 | 98 |
"Modified: / 3.8.1999 / 14:06:55 / stefan" |
4443 | 99 |
! ! |
100 |
||
101 |
!Notification class methodsFor:'documentation'! |
|
102 |
||
103 |
version |
|
4508 | 104 |
^ '$Header: /cvs/stx/stx/libbasic/Notification.st,v 1.4 1999-08-03 12:07:42 stefan Exp $' |
4443 | 105 |
! ! |
106 |
Notification initialize! |