author | Claus Gittinger <cg@exept.de> |
Mon, 18 Aug 2003 14:17:07 +0200 | |
changeset 7557 | 8eec03cef386 |
parent 7038 | 89e892bb8226 |
child 8703 | d60d97138107 |
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 |
" |
|
12 |
||
13 |
||
6206 | 14 |
"{ Package: 'stx:libbasic' }" |
15 |
||
4549 | 16 |
Exception subclass:#UserNotification |
17 |
instanceVariableNames:'' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Kernel-Exceptions' |
|
21 |
! |
|
22 |
||
23 |
!UserNotification class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1999 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 |
" |
|
37 |
||
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
7038 | 42 |
UserNotification is the superclass of all user notification |
4549 | 43 |
exceptions in the system. It produces an info box with the message |
7038 | 44 |
on the screen. If no display is available, the message is written |
45 |
to the Transcript. |
|
4549 | 46 |
|
47 |
[author:] |
|
48 |
Stefan Vogel |
|
49 |
||
50 |
[see also:] |
|
51 |
Signal |
|
52 |
" |
|
53 |
! |
|
54 |
||
55 |
examples |
|
56 |
" |
|
57 |
[exBegin] |
|
58 |
UserNotification raiseRequest |
|
59 |
[exEnd] |
|
4554 | 60 |
|
61 |
[exBegin] |
|
62 |
UserNotification raiseRequestWith:nil errorString:'what ?' |
|
63 |
[exEnd] |
|
64 |
||
65 |
[exBegin] |
|
66 |
UserNotification raiseRequestWith:nil errorString:' what ?' |
|
67 |
[exEnd] |
|
4549 | 68 |
" |
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 |
||
7557 | 85 |
!UserNotification class methodsFor:'compatibility-queries'! |
86 |
||
87 |
isQuerySignal |
|
88 |
^ true |
|
89 |
! ! |
|
90 |
||
4549 | 91 |
!UserNotification methodsFor:'default actions'! |
92 |
||
93 |
defaultAction |
|
5295 | 94 |
"Default action for notifications: open a info box with description" |
4549 | 95 |
|
96 |
|text| |
|
97 |
||
5295 | 98 |
text := self description. |
4549 | 99 |
|
7032
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
100 |
(Smalltalk isInitialized |
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
101 |
and:[Dialog notNil |
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
102 |
and:[Screen notNil |
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
103 |
and:[Screen current notNil |
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
104 |
and:[Screen current isOpen |
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
105 |
]]]]) ifTrue:[ |
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
106 |
Dialog autoload. "in case its autoloaded" |
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
107 |
Dialog information:text. |
4549 | 108 |
] ifFalse:[ |
109 |
" |
|
110 |
on systems without GUI, simply show |
|
111 |
the message on the Transcript. |
|
112 |
" |
|
7032
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
113 |
Transcript show:'notification: '; showCR:text. |
4549 | 114 |
]. |
115 |
self proceed. |
|
116 |
||
117 |
||
118 |
" |
|
7032
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
119 |
UserNotification raiseRequestErrorString:' abc' |
4549 | 120 |
" |
121 |
||
122 |
"Modified: / 3.8.1999 / 14:06:55 / stefan" |
|
123 |
! ! |
|
124 |
||
125 |
!UserNotification class methodsFor:'documentation'! |
|
126 |
||
127 |
version |
|
7557 | 128 |
^ '$Header: /cvs/stx/stx/libbasic/UserNotification.st,v 1.7 2003-08-18 12:17:07 cg Exp $' |
4549 | 129 |
! ! |
7032
3c0246b4e602
Now Warning is a subclass of UserNotification.
Stefan Vogel <sv@exept.de>
parents:
6206
diff
changeset
|
130 |
|
4549 | 131 |
UserNotification initialize! |