|
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 |
|
14 Exception subclass:#UserNotification |
|
15 instanceVariableNames:'' |
|
16 classVariableNames:'' |
|
17 poolDictionaries:'' |
|
18 category:'Kernel-Exceptions' |
|
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 " |
|
40 Notification is an abstract superclass of all user notification |
|
41 exceptions in the system. It produces an info box with the message |
|
42 on the screen. |
|
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] |
|
57 " |
|
58 |
|
59 ! ! |
|
60 |
|
61 !UserNotification class methodsFor:'initialization'! |
|
62 |
|
63 initialize |
|
64 |
|
65 NotifierString := 'User Notification:'. |
|
66 |
|
67 " |
|
68 self initialize |
|
69 " |
|
70 |
|
71 "Created: / 23.7.1999 / 15:31:44 / stefan" |
|
72 ! ! |
|
73 |
|
74 !UserNotification methodsFor:'default actions'! |
|
75 |
|
76 defaultAction |
|
77 "Default action for notifications: open a info box with errorString" |
|
78 |
|
79 |text| |
|
80 |
|
81 text := self errorString. |
|
82 |
|
83 (Smalltalk isInitialized and:[Dialog notNil]) ifTrue:[ |
|
84 Dialog notify:text. |
|
85 ] ifFalse:[ |
|
86 " |
|
87 on systems without GUI, simply show |
|
88 the message on the Transcript. |
|
89 " |
|
90 Transcript showCR:text. |
|
91 ]. |
|
92 self proceed. |
|
93 |
|
94 |
|
95 " |
|
96 UserNotification raiseRequestWith:self errorString:' abc' |
|
97 " |
|
98 |
|
99 "Modified: / 3.8.1999 / 14:06:55 / stefan" |
|
100 ! ! |
|
101 |
|
102 !UserNotification class methodsFor:'documentation'! |
|
103 |
|
104 version |
|
105 ^ '$Header: /cvs/stx/stx/libbasic/UserNotification.st,v 1.1 1999-08-04 16:26:42 stefan Exp $' |
|
106 ! ! |
|
107 UserNotification initialize! |