author | Stefan Vogel <sv@exept.de> |
Wed, 22 Sep 2004 16:42:22 +0200 | |
changeset 8586 | a38e882affa5 |
parent 8500 | 10d47cede03c |
child 8728 | d70396dc4e96 |
permissions | -rw-r--r-- |
6844 | 1 |
"{ Package: 'stx:libbasic' }" |
2 |
||
3 |
nil subclass:#ProtoObject |
|
4 |
instanceVariableNames:'' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
6912 | 7 |
category:'Kernel-Objects' |
6844 | 8 |
! |
9 |
||
10 |
!ProtoObject class methodsFor:'documentation'! |
|
11 |
||
12 |
documentation |
|
13 |
" |
|
14 |
a minimum object without much protocol; |
|
7659 | 15 |
Provides the minimum required to prevent inspectors from crashing, |
16 |
and debuggers from blocking. |
|
17 |
(i.e. instead of inheriting from nil, better inherit from this). |
|
18 |
||
6844 | 19 |
Named after a similar class found in Dolphin-Smalltalk. |
20 |
||
21 |
[author:] |
|
22 |
Claus Gittinger (not much authoring, though) |
|
23 |
" |
|
24 |
! ! |
|
25 |
||
26 |
!ProtoObject methodsFor:'error handling'! |
|
27 |
||
28 |
doesNotUnderstand:aMessage |
|
29 |
"this message is sent by the runtime system (VM) when |
|
30 |
a message is not understood by some object (i.e. there |
|
31 |
is no method for that selector). The original message has |
|
32 |
been packed into aMessage (i.e. the receiver, selector and |
|
33 |
any arguments) and the original receiver is then sent the |
|
34 |
#doesNotUnderstand: message. |
|
35 |
Here, we raise another signal which usually enters the debugger. |
|
36 |
You can of course redefine #doesNotUnderstand: in your classes |
|
37 |
to implement message delegation, |
|
8500
10d47cede03c
Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents:
7661
diff
changeset
|
38 |
or handle the MessageNotUnderstood exception gracefully." |
6844 | 39 |
|
40 |
<context: #return> |
|
41 |
||
8500
10d47cede03c
Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents:
7661
diff
changeset
|
42 |
^ MessageNotUnderstood raiseRequestWith:aMessage |
6844 | 43 |
! ! |
44 |
||
45 |
!ProtoObject methodsFor:'queries'! |
|
46 |
||
47 |
class |
|
48 |
"return the receivers class" |
|
49 |
||
50 |
%{ /* NOCONTEXT */ |
|
51 |
||
52 |
RETURN ( __Class(self) ); |
|
53 |
%} |
|
54 |
||
55 |
" |
|
56 |
*** WARNING |
|
57 |
*** |
|
58 |
*** this method has been automatically created, |
|
59 |
*** since all nil-subclasses should respond to some minimum required |
|
60 |
*** protocol. |
|
61 |
*** |
|
62 |
*** Inspection and/or debugging of instances may not be possible, |
|
63 |
*** if you remove/change this method. |
|
64 |
" |
|
65 |
! ! |
|
66 |
||
67 |
!ProtoObject methodsFor:'testing'! |
|
68 |
||
69 |
isBehavior |
|
70 |
^ false |
|
7661
71d2cac1b959
some tests aded to avoid trouble in debugger
Claus Gittinger <cg@exept.de>
parents:
7659
diff
changeset
|
71 |
! |
6844 | 72 |
|
7661
71d2cac1b959
some tests aded to avoid trouble in debugger
Claus Gittinger <cg@exept.de>
parents:
7659
diff
changeset
|
73 |
isBlock |
71d2cac1b959
some tests aded to avoid trouble in debugger
Claus Gittinger <cg@exept.de>
parents:
7659
diff
changeset
|
74 |
^ false |
7659 | 75 |
! |
76 |
||
77 |
isException |
|
78 |
^ false |
|
79 |
! |
|
80 |
||
81 |
isExceptionHandler |
|
82 |
^ false |
|
83 |
! |
|
84 |
||
85 |
isJavaObject |
|
86 |
^ false |
|
6844 | 87 |
! ! |
88 |
||
89 |
!ProtoObject class methodsFor:'documentation'! |
|
90 |
||
91 |
version |
|
8500
10d47cede03c
Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents:
7661
diff
changeset
|
92 |
^ '$Header: /cvs/stx/stx/libbasic/ProtoObject.st,v 1.8 2004-08-30 18:00:25 stefan Exp $' |
6844 | 93 |
! ! |