author | Claus Gittinger <cg@exept.de> |
Fri, 15 Sep 2006 19:52:31 +0200 | |
changeset 9908 | eede5b535b1e |
parent 9222 | 1dccfa01fb06 |
child 10589 | 47f2edd1ffc6 |
permissions | -rw-r--r-- |
8728 | 1 |
" |
2 |
COPYRIGHT (c) 2004 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 |
||
6844 | 13 |
"{ Package: 'stx:libbasic' }" |
14 |
||
15 |
nil subclass:#ProtoObject |
|
16 |
instanceVariableNames:'' |
|
17 |
classVariableNames:'' |
|
18 |
poolDictionaries:'' |
|
6912 | 19 |
category:'Kernel-Objects' |
6844 | 20 |
! |
21 |
||
22 |
!ProtoObject class methodsFor:'documentation'! |
|
23 |
||
8728 | 24 |
copyright |
25 |
" |
|
26 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
27 |
All Rights Reserved |
|
28 |
||
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
6844 | 38 |
documentation |
39 |
" |
|
40 |
a minimum object without much protocol; |
|
7659 | 41 |
Provides the minimum required to prevent inspectors from crashing, |
42 |
and debuggers from blocking. |
|
43 |
(i.e. instead of inheriting from nil, better inherit from this). |
|
44 |
||
6844 | 45 |
Named after a similar class found in Dolphin-Smalltalk. |
46 |
||
47 |
[author:] |
|
48 |
Claus Gittinger (not much authoring, though) |
|
49 |
" |
|
50 |
! ! |
|
51 |
||
52 |
!ProtoObject methodsFor:'error handling'! |
|
53 |
||
54 |
doesNotUnderstand:aMessage |
|
55 |
"this message is sent by the runtime system (VM) when |
|
56 |
a message is not understood by some object (i.e. there |
|
57 |
is no method for that selector). The original message has |
|
58 |
been packed into aMessage (i.e. the receiver, selector and |
|
59 |
any arguments) and the original receiver is then sent the |
|
60 |
#doesNotUnderstand: message. |
|
61 |
Here, we raise another signal which usually enters the debugger. |
|
62 |
You can of course redefine #doesNotUnderstand: in your classes |
|
63 |
to implement message delegation, |
|
8500
10d47cede03c
Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents:
7661
diff
changeset
|
64 |
or handle the MessageNotUnderstood exception gracefully." |
6844 | 65 |
|
66 |
<context: #return> |
|
67 |
||
8500
10d47cede03c
Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents:
7661
diff
changeset
|
68 |
^ MessageNotUnderstood raiseRequestWith:aMessage |
6844 | 69 |
! ! |
70 |
||
71 |
!ProtoObject methodsFor:'queries'! |
|
72 |
||
73 |
class |
|
74 |
"return the receivers class" |
|
75 |
||
76 |
%{ /* NOCONTEXT */ |
|
77 |
||
78 |
RETURN ( __Class(self) ); |
|
79 |
%} |
|
80 |
||
81 |
" |
|
82 |
*** WARNING |
|
83 |
*** |
|
84 |
*** this method has been automatically created, |
|
85 |
*** since all nil-subclasses should respond to some minimum required |
|
86 |
*** protocol. |
|
87 |
*** |
|
88 |
*** Inspection and/or debugging of instances may not be possible, |
|
89 |
*** if you remove/change this method. |
|
90 |
" |
|
91 |
! ! |
|
92 |
||
93 |
!ProtoObject methodsFor:'testing'! |
|
94 |
||
95 |
isBehavior |
|
9222 | 96 |
"return true, if the receiver is describing another objects behavior. |
97 |
False is returned here - the method is only redefined in Behavior." |
|
98 |
||
6844 | 99 |
^ false |
7661
71d2cac1b959
some tests aded to avoid trouble in debugger
Claus Gittinger <cg@exept.de>
parents:
7659
diff
changeset
|
100 |
! |
6844 | 101 |
|
7661
71d2cac1b959
some tests aded to avoid trouble in debugger
Claus Gittinger <cg@exept.de>
parents:
7659
diff
changeset
|
102 |
isBlock |
71d2cac1b959
some tests aded to avoid trouble in debugger
Claus Gittinger <cg@exept.de>
parents:
7659
diff
changeset
|
103 |
^ false |
7659 | 104 |
! |
105 |
||
106 |
isException |
|
107 |
^ false |
|
108 |
! |
|
109 |
||
110 |
isExceptionHandler |
|
111 |
^ false |
|
112 |
! |
|
113 |
||
114 |
isJavaObject |
|
115 |
^ false |
|
6844 | 116 |
! ! |
117 |
||
118 |
!ProtoObject class methodsFor:'documentation'! |
|
119 |
||
120 |
version |
|
9222 | 121 |
^ '$Header: /cvs/stx/stx/libbasic/ProtoObject.st,v 1.10 2006-03-06 08:57:28 cg Exp $' |
6844 | 122 |
! ! |