420
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
|
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 |
Signal subclass:#QuerySignal
|
|
14 |
instanceVariableNames:''
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Kernel-Exceptions'
|
|
18 |
!
|
|
19 |
|
|
20 |
!QuerySignal class methodsFor:'documentation'!
|
|
21 |
|
|
22 |
copyright
|
|
23 |
"
|
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
|
25 |
All Rights Reserved
|
|
26 |
|
|
27 |
This software is furnished under a license and may be used
|
|
28 |
only in accordance with the terms of that license and with the
|
|
29 |
inclusion of the above copyright notice. This software may not
|
|
30 |
be provided or otherwise made available to, or used by, any
|
|
31 |
other person. No title to or ownership of the software is
|
|
32 |
hereby transferred.
|
|
33 |
"
|
|
34 |
!
|
|
35 |
|
|
36 |
version
|
|
37 |
"
|
|
38 |
$Header: /cvs/stx/stx/libbasic/QuerySignal.st,v 1.1 1995-09-02 16:08:30 claus Exp $
|
|
39 |
"
|
|
40 |
!
|
|
41 |
|
|
42 |
documentation
|
|
43 |
"
|
|
44 |
QuerySignals are like signals, except that they are not accepted
|
|
45 |
by handlers for ordinary signals.
|
|
46 |
I.e. a signal handler for a normal signal will not handle a query
|
|
47 |
signal. Thus, these bypass any Object-ErrorSignal handler.
|
|
48 |
"
|
|
49 |
! !
|
|
50 |
|
|
51 |
!QuerySignal methodsFor:'queries'!
|
|
52 |
|
|
53 |
isQuerySignal
|
|
54 |
^ true
|
|
55 |
!
|
|
56 |
|
|
57 |
accepts:aSignal
|
|
58 |
"return true, if the receiver accepts the argument, aSignal.
|
|
59 |
(i.e. the receiver is aSignal or a parent of it). False otherwise."
|
|
60 |
|
|
61 |
|s|
|
|
62 |
|
|
63 |
aSignal isQuery ifFalse:[^ false].
|
|
64 |
|
|
65 |
s := aSignal.
|
|
66 |
[s notNil] whileTrue:[
|
|
67 |
self == s ifTrue:[^ true].
|
|
68 |
s := s parent
|
|
69 |
].
|
|
70 |
^ false
|
|
71 |
! !
|