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 |
|
|
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 |
"
|
5295
|
40 |
UserNotification is an abstract superclass of all user notification
|
4549
|
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]
|
4554
|
57 |
|
|
58 |
[exBegin]
|
|
59 |
UserNotification raiseRequestWith:nil errorString:'what ?'
|
|
60 |
[exEnd]
|
|
61 |
|
|
62 |
[exBegin]
|
|
63 |
UserNotification raiseRequestWith:nil errorString:' what ?'
|
|
64 |
[exEnd]
|
4549
|
65 |
"
|
|
66 |
|
|
67 |
! !
|
|
68 |
|
|
69 |
!UserNotification class methodsFor:'initialization'!
|
|
70 |
|
|
71 |
initialize
|
|
72 |
|
|
73 |
NotifierString := 'User Notification:'.
|
|
74 |
|
|
75 |
"
|
|
76 |
self initialize
|
|
77 |
"
|
|
78 |
|
|
79 |
"Created: / 23.7.1999 / 15:31:44 / stefan"
|
|
80 |
! !
|
|
81 |
|
|
82 |
!UserNotification methodsFor:'default actions'!
|
|
83 |
|
|
84 |
defaultAction
|
5295
|
85 |
"Default action for notifications: open a info box with description"
|
4549
|
86 |
|
|
87 |
|text|
|
|
88 |
|
5295
|
89 |
text := self description.
|
4549
|
90 |
|
|
91 |
(Smalltalk isInitialized and:[Dialog notNil]) ifTrue:[
|
|
92 |
Dialog notify:text.
|
|
93 |
] ifFalse:[
|
|
94 |
"
|
|
95 |
on systems without GUI, simply show
|
|
96 |
the message on the Transcript.
|
|
97 |
"
|
|
98 |
Transcript showCR:text.
|
|
99 |
].
|
|
100 |
self proceed.
|
|
101 |
|
|
102 |
|
|
103 |
"
|
|
104 |
UserNotification raiseRequestWith:self errorString:' abc'
|
|
105 |
"
|
|
106 |
|
|
107 |
"Modified: / 3.8.1999 / 14:06:55 / stefan"
|
|
108 |
! !
|
|
109 |
|
|
110 |
!UserNotification class methodsFor:'documentation'!
|
|
111 |
|
|
112 |
version
|
5295
|
113 |
^ '$Header: /cvs/stx/stx/libbasic/UserNotification.st,v 1.3 2000-03-19 17:16:43 stefan Exp $'
|
4549
|
114 |
! !
|
|
115 |
UserNotification initialize!
|