author | Jan Vrany <jan.vrany@labware.com> |
Sat, 29 Oct 2022 01:05:05 +0100 | |
branch | jv |
changeset 25446 | 98fb817db6de |
parent 25442 | f909fb8f9b36 |
permissions | -rw-r--r-- |
1 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1988 by Claus Gittinger |
23107 | 3 |
COPYRIGHT (c) 2015 Jan Vrany |
25442
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
4 |
COPYRIGHT (c) 2023 LabWare |
159 | 5 |
All Rights Reserved |
1 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
5471
a57eeb01c5ab
General encoding method (#encodeOn:with:)
Stefan Vogel <sv@exept.de>
parents:
4682
diff
changeset
|
14 |
"{ Package: 'stx:libbasic' }" |
a57eeb01c5ab
General encoding method (#encodeOn:with:)
Stefan Vogel <sv@exept.de>
parents:
4682
diff
changeset
|
15 |
|
18480 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
1 | 18 |
Object subclass:#UndefinedObject |
1029
c469a63e88e2
only redefine #class/#isbehavior/#doesNotUnderstand once (if no methods are present yet)
Claus Gittinger <cg@exept.de>
parents:
695
diff
changeset
|
19 |
instanceVariableNames:'' |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
20 |
classVariableNames:'CreateMinimumProtocolInNewSubclassQuery' |
1029
c469a63e88e2
only redefine #class/#isbehavior/#doesNotUnderstand once (if no methods are present yet)
Claus Gittinger <cg@exept.de>
parents:
695
diff
changeset
|
21 |
poolDictionaries:'' |
c469a63e88e2
only redefine #class/#isbehavior/#doesNotUnderstand once (if no methods are present yet)
Claus Gittinger <cg@exept.de>
parents:
695
diff
changeset
|
22 |
category:'Kernel-Objects' |
1 | 23 |
! |
24 |
||
88 | 25 |
!UndefinedObject class methodsFor:'documentation'! |
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1988 by Claus Gittinger |
|
23107 | 30 |
COPYRIGHT (c) 2015 Jan Vrany |
25442
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
31 |
COPYRIGHT (c) 2023 LabWare |
159 | 32 |
All Rights Reserved |
1 | 33 |
|
88 | 34 |
This software is furnished under a license and may be used |
35 |
only in accordance with the terms of that license and with the |
|
36 |
inclusion of the above copyright notice. This software may not |
|
37 |
be provided or otherwise made available to, or used by, any |
|
38 |
other person. No title to or ownership of the software is |
|
39 |
hereby transferred. |
|
40 |
" |
|
41 |
! |
|
42 |
||
43 |
documentation |
|
44 |
" |
|
20215 | 45 |
there is only one instance of this class: nil, |
1303 | 46 |
representing an undefined or otherwise unspecified object. |
88 | 47 |
|
20215 | 48 |
All instance variables, array elements and even method/block local |
88 | 49 |
variables are initially set to nil. |
1303 | 50 |
|
20215 | 51 |
Since in Smalltalk/X (and in other smalltalks), nil is represented by |
52 |
a special pointer value (NULL), there can be only one instance of UndefinedObject, |
|
53 |
and no subclassing is possible. |
|
54 |
(to be exact: subclassing UndefinedObject is technically possible, |
|
55 |
but instances of it would not be recognized as being nil |
|
1303 | 56 |
- therefore, subclassing is blocked and an error is raised when it is tried) |
57 |
||
58 |
For advanced users: |
|
59 |
Beside the above role, nil can be subclassed (!!). |
|
60 |
This creates a class which inherits no protocol whatsoever - not even |
|
61 |
the basic interfaces as defined by the Object class. Subclasses of nil |
|
62 |
are useful if all messages send to instances should trap into the |
|
63 |
#doesNotUnderstand: method. For example, proxy objects are typically defined |
|
64 |
this way. |
|
1294 | 65 |
|
66 |
[author:] |
|
67 |
Claus Gittinger |
|
88 | 68 |
" |
69 |
! ! |
|
1 | 70 |
|
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
71 |
!UndefinedObject class methodsFor:'initialization'! |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
72 |
|
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
73 |
initialize |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
74 |
CreateMinimumProtocolInNewSubclassQuery isNil ifTrue:[ |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
75 |
CreateMinimumProtocolInNewSubclassQuery := QuerySignal new. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
76 |
CreateMinimumProtocolInNewSubclassQuery nameClass:self message:#createMinimumProtocolInNewSubclassQuery. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
77 |
CreateMinimumProtocolInNewSubclassQuery defaultAnswer:false. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
78 |
]. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
79 |
|
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
80 |
" |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
81 |
UndefinedObject initialize |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
82 |
" |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
83 |
|
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
84 |
"Created: 3.1.1997 / 15:02:40 / cg" |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
85 |
"Modified: 3.1.1997 / 15:18:33 / cg" |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
86 |
! ! |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
87 |
|
1 | 88 |
!UndefinedObject class methodsFor:'instance creation'! |
89 |
||
90 |
basicNew |
|
91 |
"catch new - there MUST be only one nil in the system" |
|
92 |
||
93 |
^ nil |
|
94 |
! |
|
95 |
||
96 |
basicNew:size |
|
97 |
"catch new - there MUST be only one nil in the system" |
|
98 |
||
99 |
^ nil |
|
100 |
! ! |
|
101 |
||
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
102 |
!UndefinedObject class methodsFor:'Signal constants'! |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
103 |
|
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
104 |
createMinimumProtocolInNewSubclassQuery |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
105 |
"return the signal used to ask if the minimum required protocol |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
106 |
should be created for nil subclasses. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
107 |
By default, this is not done, however, the browser answers true |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
108 |
here, to avoid big trouble with nil subclasses which do not define |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
109 |
some methods which the inspector needs." |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
110 |
|
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
111 |
^ CreateMinimumProtocolInNewSubclassQuery |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
112 |
|
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
113 |
"Created: 3.1.1997 / 15:05:48 / cg" |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
114 |
"Modified: 3.1.1997 / 15:06:15 / cg" |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
115 |
! ! |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
116 |
|
21316 | 117 |
|
51 | 118 |
!UndefinedObject class methodsFor:'queries'! |
119 |
||
120 |
canBeSubclassed |
|
20215 | 121 |
"return true if it is allowed to create subclasses of the receiver. |
3914 | 122 |
Return false here - since it is NOT possible for UndefinedObject. |
123 |
(due to the representation of nil as a 0-pointer)" |
|
51 | 124 |
|
125 |
^ false |
|
3914 | 126 |
|
127 |
"Modified: / 5.11.1998 / 16:11:43 / cg" |
|
2672
dc3662188b2c
added #hasImmediateInstances for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
2416
diff
changeset
|
128 |
! |
dc3662188b2c
added #hasImmediateInstances for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
2416
diff
changeset
|
129 |
|
dc3662188b2c
added #hasImmediateInstances for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
2416
diff
changeset
|
130 |
hasImmediateInstances |
4652
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
131 |
"return true if this class has immediate instances |
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
132 |
i.e. if the instances are represented in the pointer itself and |
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
133 |
no real object header/storage is used for the object. |
2672
dc3662188b2c
added #hasImmediateInstances for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
2416
diff
changeset
|
134 |
Redefined from Behavior" |
dc3662188b2c
added #hasImmediateInstances for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
2416
diff
changeset
|
135 |
|
dc3662188b2c
added #hasImmediateInstances for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
2416
diff
changeset
|
136 |
^ true |
dc3662188b2c
added #hasImmediateInstances for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
2416
diff
changeset
|
137 |
|
dc3662188b2c
added #hasImmediateInstances for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
2416
diff
changeset
|
138 |
"Created: 3.6.1997 / 12:01:39 / cg" |
4321 | 139 |
! |
140 |
||
4652
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
141 |
hasSharedInstances |
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
142 |
"return true if this class has shared instances, that is, instances |
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
143 |
with the same value are identical. |
4654 | 144 |
True returned here - there is only one nil." |
4652
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
145 |
|
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
146 |
^ true |
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
147 |
|
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
148 |
|
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
149 |
! |
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
150 |
|
4321 | 151 |
isBuiltInClass |
20215 | 152 |
"return true if this class is known by the run-time-system, |
4321 | 153 |
i.e. you cannot add/remove instance variables without recompiling |
154 |
the VM. |
|
155 |
Here, true is returned for myself, false for subclasses." |
|
156 |
||
157 |
^ self == UndefinedObject |
|
51 | 158 |
! ! |
159 |
||
5699 | 160 |
|
25442
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
161 |
|
18645
86c46e336392
Added ClassDescription>>subclass:... method for more compatbility with Squeak/Pharo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18482
diff
changeset
|
162 |
!UndefinedObject methodsFor:'Compatibility-Squeak'! |
86c46e336392
Added ClassDescription>>subclass:... method for more compatbility with Squeak/Pharo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18482
diff
changeset
|
163 |
|
86c46e336392
Added ClassDescription>>subclass:... method for more compatbility with Squeak/Pharo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18482
diff
changeset
|
164 |
subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString category:cat |
86c46e336392
Added ClassDescription>>subclass:... method for more compatbility with Squeak/Pharo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18482
diff
changeset
|
165 |
^ self subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries: '' category:cat |
86c46e336392
Added ClassDescription>>subclass:... method for more compatbility with Squeak/Pharo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18482
diff
changeset
|
166 |
|
86c46e336392
Added ClassDescription>>subclass:... method for more compatbility with Squeak/Pharo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18482
diff
changeset
|
167 |
"Created: / 24-07-2015 / 19:29:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
86c46e336392
Added ClassDescription>>subclass:... method for more compatbility with Squeak/Pharo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18482
diff
changeset
|
168 |
! ! |
86c46e336392
Added ClassDescription>>subclass:... method for more compatbility with Squeak/Pharo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18482
diff
changeset
|
169 |
|
21316 | 170 |
|
171 |
||
2416 | 172 |
!UndefinedObject methodsFor:'converting'! |
173 |
||
8305 | 174 |
asBoolean |
175 |
^ false |
|
176 |
! |
|
177 |
||
15081 | 178 |
asNilIfEmpty |
179 |
"I am nil, so answer nil" |
|
180 |
||
181 |
^ self |
|
182 |
! |
|
183 |
||
25442
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
184 |
doIfNotNil:aBlock |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
185 |
"if I am a collection, then enumerate myself into aBlock. |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
186 |
if I am nil, then do nothing. |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
187 |
Return the receiver. |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
188 |
Otherwise, evaluate aBlock with myself as argument. |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
189 |
Here, answer nil" |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
190 |
|
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
191 |
^ nil |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
192 |
|
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
193 |
"Created: / 20-03-2018 / 15:37:11 / stefan" |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
194 |
"Modified (comment): / 05-08-2018 / 11:26:32 / Claus Gittinger" |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
195 |
! |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
196 |
|
2416 | 197 |
literalArrayEncoding |
198 |
"encode myself as an array literal, from which a copy of the receiver |
|
199 |
can be reconstructed with #decodeAsLiteralArray." |
|
200 |
||
201 |
^ self |
|
202 |
||
203 |
"Created: 25.2.1997 / 19:18:47 / cg" |
|
204 |
! ! |
|
205 |
||
695 | 206 |
!UndefinedObject methodsFor:'copying'! |
207 |
||
208 |
copy |
|
209 |
"return a shallow copy of myself |
|
210 |
- since there is only one nil in the system return self" |
|
211 |
||
212 |
^ self |
|
213 |
! |
|
214 |
||
215 |
deepCopy |
|
216 |
"return a deep copy of myself |
|
217 |
- since there is only one nil in the system return self" |
|
218 |
||
219 |
^ self |
|
220 |
! |
|
221 |
||
10945 | 222 |
deepCopyUsing:aDictionary postCopySelector:postCopySelector |
695 | 223 |
"return a deep copy of myself |
8383 | 224 |
- since there is only one nil in the system, return self" |
695 | 225 |
|
226 |
^ self |
|
227 |
! |
|
228 |
||
229 |
shallowCopy |
|
230 |
"return a shallow copy of myself |
|
231 |
- since there is only one nil in the system return self" |
|
232 |
||
233 |
^ self |
|
234 |
! |
|
235 |
||
236 |
simpleDeepCopy |
|
237 |
"return a deep copy of myself |
|
238 |
- since there is only one nil in the system return self" |
|
239 |
||
240 |
^ self |
|
241 |
! ! |
|
242 |
||
3166 | 243 |
!UndefinedObject methodsFor:'dependents access'! |
244 |
||
245 |
addDependent:someObject |
|
12968
07761a8bcc6a
comment/format in: #addDependent:
Claus Gittinger <cg@exept.de>
parents:
11821
diff
changeset
|
246 |
"raise an error here - nil may not have dependents (it never changes anyway)" |
3166 | 247 |
|
4530
793b116fef3e
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4339
diff
changeset
|
248 |
self error:'nil may not have dependents' mayProceed:true |
793b116fef3e
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4339
diff
changeset
|
249 |
|
12968
07761a8bcc6a
comment/format in: #addDependent:
Claus Gittinger <cg@exept.de>
parents:
11821
diff
changeset
|
250 |
"Modified: / 28-07-2010 / 19:20:36 / cg" |
3166 | 251 |
! |
252 |
||
3183 | 253 |
dependents |
254 |
"nil has no dependents" |
|
255 |
||
256 |
^#() |
|
257 |
! |
|
258 |
||
3464
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
259 |
release |
3166 | 260 |
"ignored here - nil has no dependents" |
3183 | 261 |
! |
3166 | 262 |
|
3464
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
263 |
removeDependent:someObject |
3183 | 264 |
"ignored here - nil has no dependents" |
3166 | 265 |
! ! |
266 |
||
1 | 267 |
!UndefinedObject methodsFor:'error catching'! |
268 |
||
269 |
basicAt:index |
|
20700 | 270 |
"catch array access - it's illegal. |
271 |
Redefined here since basicAt: in Object ommits the nil-check" |
|
1 | 272 |
|
273 |
^ self notIndexed |
|
274 |
! |
|
275 |
||
276 |
basicAt:index put:anObject |
|
20700 | 277 |
"catch array access - it's illegal. |
278 |
Redefined here since basicAt:put: in Object ommits the nil-check" |
|
1 | 279 |
|
280 |
^ self notIndexed |
|
281 |
! ! |
|
282 |
||
14678 | 283 |
|
1 | 284 |
!UndefinedObject methodsFor:'printing & storing'! |
285 |
||
63 | 286 |
printOn:aStream |
287 |
"append a printed representation of the receiver to the |
|
288 |
argument, aStream" |
|
289 |
||
290 |
aStream nextPutAll:'nil' |
|
291 |
! |
|
292 |
||
695 | 293 |
printString |
294 |
"return a string for printing myself" |
|
295 |
||
296 |
^ 'nil' |
|
297 |
! |
|
298 |
||
63 | 299 |
storeOn:aStream |
300 |
"append a printed representation of the receiver to the |
|
301 |
argument, aStream, which allows reconstruction of it" |
|
302 |
||
303 |
^ self printOn:aStream |
|
695 | 304 |
! |
305 |
||
306 |
storeString |
|
307 |
"return a string for storing myself" |
|
308 |
||
309 |
^ 'nil' |
|
1 | 310 |
! ! |
2 | 311 |
|
5557 | 312 |
!UndefinedObject methodsFor:'queries'! |
313 |
||
314 |
basicSize |
|
315 |
"return the number of indexed instvars |
|
316 |
defined here since size in Object ommits the nil-check" |
|
317 |
||
318 |
^ 0 |
|
319 |
! |
|
320 |
||
321 |
size |
|
322 |
"return the number of indexed instvars |
|
323 |
defined here since size in Object ommits the nil-check" |
|
20215 | 324 |
|
5557 | 325 |
^ 0 |
326 |
! ! |
|
5471
a57eeb01c5ab
General encoding method (#encodeOn:with:)
Stefan Vogel <sv@exept.de>
parents:
4682
diff
changeset
|
327 |
|
77 | 328 |
!UndefinedObject methodsFor:'subclass creation'! |
329 |
||
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
330 |
nilSubclass:action |
356 | 331 |
"common helper for subclass creation. |
20215 | 332 |
Creates a nil-superclass class. |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
333 |
If the CreateMinimumProtocolInNewSubclassQuery answers true, |
20215 | 334 |
entries for the minimum required protocol (#class, #isBehavior |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
335 |
and #doesNotUnderstand:) are also automatically created. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
336 |
(this query is typically answered by the browser) |
356 | 337 |
These are required to avoid getting into deep trouble when |
338 |
inspecting or debugging instances of this new class. |
|
339 |
The methods get a modified source code to remind you that these |
|
340 |
methods were automatically generated." |
|
341 |
||
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1303
diff
changeset
|
342 |
|newClass methodDict method| |
202 | 343 |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1303
diff
changeset
|
344 |
Class withoutUpdatingChangesDo:[ |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
345 |
newClass := action value |
77 | 346 |
]. |
347 |
newClass notNil ifTrue:[ |
|
1029
c469a63e88e2
only redefine #class/#isbehavior/#doesNotUnderstand once (if no methods are present yet)
Claus Gittinger <cg@exept.de>
parents:
695
diff
changeset
|
348 |
newClass setSuperclass:nil. |
1803
754f9205b651
meta's superclass should be class - not Object.
Claus Gittinger <cg@exept.de>
parents:
1638
diff
changeset
|
349 |
newClass class setSuperclass:Class. |
356 | 350 |
|
21316 | 351 |
newClass hasMethods ifFalse:[ |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
352 |
Class addChangeRecordForClass:newClass. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
353 |
|
4060
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
354 |
CreateMinimumProtocolInNewSubclassQuery query |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
355 |
ifTrue:[ |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
356 |
" |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
357 |
copy over method objects from Object |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
358 |
and modify the source code |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
359 |
" |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
360 |
methodDict := MethodDictionary new:3. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
361 |
#(#class #isBehavior #doesNotUnderstand:) do:[:sel| |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
362 |
method := (Object compiledMethodAt:sel) copy. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
363 |
method source: method source , ' |
356 | 364 |
" |
365 |
*** WARNING |
|
366 |
*** |
|
367 |
*** this method has been automatically created, |
|
368 |
*** since all nil-subclasses should respond to some minimum required |
|
369 |
*** protocol. |
|
370 |
*** |
|
371 |
*** Inspection and/or debugging of instances may not be possible, |
|
372 |
*** if you remove/change this method. |
|
373 |
" |
|
374 |
'. |
|
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
375 |
methodDict at:sel put:method. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
376 |
"/ newClass addChangeRecordForMethod:method |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
377 |
]. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
378 |
newClass methodDictionary:methodDict. |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
379 |
] |
1029
c469a63e88e2
only redefine #class/#isbehavior/#doesNotUnderstand once (if no methods are present yet)
Claus Gittinger <cg@exept.de>
parents:
695
diff
changeset
|
380 |
] |
77 | 381 |
]. |
382 |
^ newClass |
|
1029
c469a63e88e2
only redefine #class/#isbehavior/#doesNotUnderstand once (if no methods are present yet)
Claus Gittinger <cg@exept.de>
parents:
695
diff
changeset
|
383 |
|
4060
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
384 |
"Modified: / 3.1.1997 / 15:53:21 / cg" |
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
385 |
"Created: / 3.1.1997 / 16:00:34 / cg" |
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
386 |
"Modified: / 18.3.1999 / 18:29:58 / stefan" |
202 | 387 |
! |
388 |
||
9256 | 389 |
subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool |
20215 | 390 |
"create a new class which has nil as superclass |
9256 | 391 |
- i.e. traps into #doesNotUnderstand: for all of its messages." |
392 |
||
14678 | 393 |
"this method allows fileIn of ST/V and V'Age classes |
394 |
(which seem to have no category)" |
|
395 |
||
20215 | 396 |
^ self |
397 |
subclass:nameSymbol |
|
398 |
instanceVariableNames:instVarNameString |
|
399 |
classVariableNames:classVarString |
|
9256 | 400 |
poolDictionaries:pool |
401 |
category:(Class defaultCategoryForSTVorVAGEClasses). |
|
402 |
! |
|
403 |
||
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
404 |
subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat |
20215 | 405 |
"create a new class which has nil as superclass |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
406 |
- i.e. traps into #doesNotUnderstand: for all of its messages." |
202 | 407 |
|
20215 | 408 |
^ self |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
409 |
nilSubclass:[ |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
410 |
Object class |
20215 | 411 |
name:nameSymbol |
4060
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
412 |
inEnvironment:(Class nameSpaceQuerySignal query) |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
413 |
subclassOf:self |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
414 |
instanceVariableNames:instVarNameString |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
415 |
variable:false |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
416 |
words:true |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
417 |
pointers:true |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
418 |
classVariableNames:classVarString |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
419 |
poolDictionaries:pool |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
420 |
category:cat |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
421 |
comment:nil |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
422 |
changed:true |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
423 |
] |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
424 |
|
4060
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
425 |
"Modified: / 3.1.1997 / 16:00:39 / cg" |
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
426 |
"Modified: / 18.3.1999 / 18:30:07 / stefan" |
695 | 427 |
! |
428 |
||
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
429 |
variableByteSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat |
20215 | 430 |
"create a new class which has nil as superclass |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
431 |
- i.e. traps into #doesNotUnderstand: for all of its messages." |
695 | 432 |
|
20215 | 433 |
^ self |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
434 |
nilSubclass:[ |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
435 |
Object class |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
436 |
name:nameSymbol |
4060
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
437 |
inEnvironment:(Class nameSpaceQuerySignal query) |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
438 |
subclassOf:self |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
439 |
instanceVariableNames:instVarNameString |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
440 |
variable:true |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
441 |
words:false |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
442 |
pointers:false |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
443 |
classVariableNames:classVarString |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
444 |
poolDictionaries:pool |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
445 |
category:cat |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
446 |
comment:nil |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
447 |
changed:true |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
448 |
] |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
449 |
|
4060
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
450 |
"Modified: / 3.1.1997 / 16:00:42 / cg" |
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
451 |
"Modified: / 18.3.1999 / 18:30:11 / stefan" |
695 | 452 |
! |
77 | 453 |
|
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
454 |
variableSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat |
20215 | 455 |
"create a new class which has nil as superclass |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
456 |
- i.e. traps into #doesNotUnderstand: for all of its messages." |
77 | 457 |
|
20215 | 458 |
^ self |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
459 |
nilSubclass:[ |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
460 |
Object class |
20215 | 461 |
name:nameSymbol |
4060
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
462 |
inEnvironment:(Class nameSpaceQuerySignal query) |
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
463 |
subclassOf:self |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
464 |
instanceVariableNames:instVarNameString |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
465 |
variable:true |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
466 |
words:false |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
467 |
pointers:true |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
468 |
classVariableNames:classVarString |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
469 |
poolDictionaries:pool |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
470 |
category:cat |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
471 |
comment:nil |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
472 |
changed:true |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
473 |
] |
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
474 |
|
4060
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
475 |
"Modified: / 3.1.1997 / 16:00:45 / cg" |
1048a3abf128
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
3914
diff
changeset
|
476 |
"Modified: / 18.3.1999 / 18:30:16 / stefan" |
695 | 477 |
! ! |
478 |
||
7262 | 479 |
!UndefinedObject methodsFor:'subclass creation-private'! |
5745 | 480 |
|
18480 | 481 |
subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:ownerClassArg |
20215 | 482 |
"create a new private class which has nil as superclass |
5745 | 483 |
- i.e. traps into #doesNotUnderstand: for all of its messages." |
484 |
||
18480 | 485 |
|category ownerClass| |
486 |
||
487 |
(ownerClass := ownerClassArg) isNil ifTrue:[ |
|
488 |
self error:'Nil (undefined) owner class - proceed to define as global' mayProceed:true. |
|
489 |
] ifFalse:[ |
|
490 |
category := ownerClassArg category |
|
491 |
]. |
|
20215 | 492 |
|
493 |
^ self |
|
5745 | 494 |
nilSubclass:[ |
495 |
Object class |
|
20215 | 496 |
name:nameSymbol |
5745 | 497 |
inEnvironment:ownerClass |
498 |
subclassOf:self |
|
499 |
instanceVariableNames:instVarNameString |
|
500 |
variable:false |
|
501 |
words:true |
|
502 |
pointers:true |
|
503 |
classVariableNames:classVarString |
|
504 |
poolDictionaries:pool |
|
18480 | 505 |
category:category |
5745 | 506 |
comment:nil |
507 |
changed:true |
|
508 |
] |
|
509 |
||
510 |
"Modified: / 3.1.1997 / 16:00:39 / cg" |
|
511 |
"Modified: / 18.3.1999 / 18:30:07 / stefan" |
|
512 |
! ! |
|
513 |
||
695 | 514 |
!UndefinedObject methodsFor:'testing'! |
515 |
||
1868 | 516 |
? defaultValue |
20191 | 517 |
"a syntactic sugar-piece: |
3466 | 518 |
if the receiver is nil, return the defaultValue; |
1868 | 519 |
otherwise, return the receiver. |
520 |
This method is redefined from Object; |
|
20215 | 521 |
the argument is returned unconditionally here. |
1868 | 522 |
|
1958 | 523 |
Thus, if foo and bar are simple variables or constants, |
524 |
foo ? bar |
|
525 |
is the same as: |
|
526 |
(foo isNil ifTrue:[bar] ifFalse:[foo]) |
|
527 |
||
528 |
if they are message sends, the equivalent code is: |
|
529 |
[ |
|
530 |
|t1 t2| |
|
531 |
||
532 |
t1 := foo. |
|
533 |
t2 := bar. |
|
534 |
t1 isNil ifTrue:[t2] ifFalse:[t1] |
|
535 |
] value |
|
536 |
||
1868 | 537 |
Can be used to provide defaultValues to variables, |
538 |
as in: |
|
1958 | 539 |
foo := arg ? #defaultValue |
1868 | 540 |
" |
541 |
||
542 |
^ defaultValue |
|
543 |
||
544 |
" |
|
545 |
1 ? #default |
|
20191 | 546 |
nil ? #default |
1868 | 547 |
" |
548 |
||
3466 | 549 |
"Created: / 4.11.1996 / 20:37:09 / cg" |
550 |
"Modified: / 19.5.1998 / 17:39:36 / cg" |
|
1868 | 551 |
! |
552 |
||
16127 | 553 |
?+ aOneArgBlock |
554 |
"a syntactic sugar-piece: |
|
555 |
aOneArgBlock is executed with self as argument |
|
556 |
if self is not nil. |
|
557 |
||
558 |
Note: this method should never be redefined in classes other than UndefinedObject. |
|
559 |
" |
|
560 |
||
561 |
^ self |
|
562 |
! |
|
563 |
||
3464
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
564 |
?? defaultValue |
11635 | 565 |
"a syntactic sugar-piece: |
3466 | 566 |
much like ?, but sends value to the argument if required. |
3464
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
567 |
If the receiver is nil, return the defaultValues value; |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
568 |
otherwise, return the receiver. |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
569 |
This method is redefined from Object. |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
570 |
|
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
571 |
Thus, if foo and bar are simple variables or constants, |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
572 |
foo ?? bar |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
573 |
is the same as: |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
574 |
(foo isNil ifTrue:[bar value] ifFalse:[foo]) |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
575 |
|
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
576 |
if they are message sends, the equivalent code is: |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
577 |
[ |
3466 | 578 |
|t| |
3464
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
579 |
|
3466 | 580 |
t := foo. |
581 |
t isNil ifTrue:[bar value] ifFalse:[t] |
|
3464
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
582 |
] value |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
583 |
|
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
584 |
Can be used to provide defaultValues to variables, |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
585 |
as in: |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
586 |
foo := arg ?? [something] |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
587 |
" |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
588 |
|
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
589 |
^ defaultValue value |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
590 |
|
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
591 |
" |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
592 |
1 ?? #default |
20215 | 593 |
nil ?? #default |
594 |
1 ?? [Date today] |
|
595 |
nil ?? [Date today] |
|
3464
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
596 |
" |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
597 |
|
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
598 |
"Created: / 4.11.1996 / 20:37:09 / cg" |
3466 | 599 |
"Modified: / 19.5.1998 / 17:42:10 / cg" |
3464
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
600 |
! |
b0009b3ea4f2
added ?? - much like ?, but sends #value to its argument.
Claus Gittinger <cg@exept.de>
parents:
3183
diff
changeset
|
601 |
|
7108
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
602 |
checkNilFileStream |
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
603 |
"Do nothing if this is a valid FileStream |
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
604 |
(i.e. the previous open operation was successful). |
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
605 |
Also implemented in UndefinedObject, to raise an Error there. |
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
606 |
|
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
607 |
This is an aid for converting from the old error reporting (returning nil) |
11635 | 608 |
to the new error reporting (with real Exceptions). |
7108
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
609 |
|
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
610 |
It will vanish as soon as the conversion has been done" |
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
611 |
|
16127 | 612 |
^ OpenError raise |
7108
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
613 |
! |
90b7cfc06ab8
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
6932
diff
changeset
|
614 |
|
695 | 615 |
hash |
616 |
"return an integer useful as a hash key" |
|
617 |
||
618 |
^ 0 |
|
619 |
! |
|
620 |
||
621 |
identityHash |
|
622 |
"return an integer useful as a hash key" |
|
623 |
||
624 |
^ 0 |
|
625 |
! |
|
626 |
||
4339
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
627 |
ifNil:aBlockOrValue |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
628 |
"return myself, or the result from evaluating the argument, if I am nil. |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
629 |
This is much like #?, but sends #value to the argument in case of a nil |
5796 | 630 |
receiver. |
631 |
Notice: |
|
632 |
This method is open coded (inlined) by the compiler(s) |
|
633 |
- redefining it may not work as expected." |
|
4339
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
634 |
|
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
635 |
^ aBlockOrValue value |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
636 |
! |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
637 |
|
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
638 |
ifNil:nilBlockOrValue ifNotNil:notNilBlockOrValue |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
639 |
"return the value of the first arg, if I am nil, |
5796 | 640 |
the result from evaluating the 2nd argument, if I am not nil. |
641 |
Notice: |
|
642 |
This method is open coded (inlined) by the compiler(s) |
|
643 |
- redefining it may not work as expected." |
|
4339
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
644 |
|
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
645 |
^ nilBlockOrValue value |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
646 |
! |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
647 |
|
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
648 |
ifNotNil:aBlockOrValue |
5796 | 649 |
"return myself if nil, or the result from evaluating the argument, if I am not nil. |
650 |
Notice: |
|
651 |
This method is open coded (inlined) by the compiler(s) |
|
652 |
- redefining it may not work as expected." |
|
4339
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
653 |
|
8574 | 654 |
^ nil |
4339
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
655 |
! |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
656 |
|
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
657 |
ifNotNil:notNilBlockOrValue ifNil:nilBlockOrValue |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
658 |
"return the value of the 2nd arg, if I am nil, |
5796 | 659 |
the result from evaluating the 1st argument, if I am not nil. |
660 |
Notice: |
|
661 |
This method is open coded (inlined) by the compiler(s) |
|
662 |
- redefining it may not work as expected." |
|
4339
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
663 |
|
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
664 |
^ nilBlockOrValue value |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
665 |
! |
18c19912a67c
added #ifNil and friends - squeak compatibility.
Claus Gittinger <cg@exept.de>
parents:
4321
diff
changeset
|
666 |
|
8574 | 667 |
ifNotNilDo:aBlock |
20352 | 668 |
"if the receiver is non-nil, return the value of aBlock, passing myself as argument. |
8574 | 669 |
Otherwise do nothing and return nil." |
670 |
||
671 |
^ nil |
|
672 |
! |
|
673 |
||
6181 | 674 |
isEmptyOrNil |
20215 | 675 |
"return true if I am nil or an empty collection |
13588 | 676 |
- since I am nil, return true. (from Sqeak)" |
6181 | 677 |
|
678 |
^ true |
|
679 |
||
13588 | 680 |
"Created: / 13-11-2001 / 13:16:40 / cg" |
681 |
"Modified (comment): / 17-08-2011 / 09:29:30 / cg" |
|
6181 | 682 |
! |
683 |
||
695 | 684 |
isLiteral |
20215 | 685 |
"return true if the receiver can be used as a literal constant in ST syntax |
695 | 686 |
(i.e. can be used in constant arrays)" |
77 | 687 |
|
695 | 688 |
^ true |
689 |
! |
|
690 |
||
691 |
isNil |
|
20215 | 692 |
"Return true if the receiver is nil. |
9223 | 693 |
Since I am definitely nil, unconditionally return true here. |
3044 | 694 |
Notice: |
9223 | 695 |
This method is open coded (inlined) by the compiler(s) |
696 |
- redefining it may not work as expected." |
|
695 | 697 |
|
698 |
^ true |
|
699 |
! |
|
700 |
||
6068
1d5ca1175f3f
added #isNilOrEmptyCollection
Claus Gittinger <cg@exept.de>
parents:
5796
diff
changeset
|
701 |
isNilOrEmptyCollection |
8833 | 702 |
"return true if I am nil or an empty collection - false here. |
703 |
Obsolete, use isEmptyOrNil." |
|
704 |
||
705 |
<resource:#obsolete> |
|
6068
1d5ca1175f3f
added #isNilOrEmptyCollection
Claus Gittinger <cg@exept.de>
parents:
5796
diff
changeset
|
706 |
|
1d5ca1175f3f
added #isNilOrEmptyCollection
Claus Gittinger <cg@exept.de>
parents:
5796
diff
changeset
|
707 |
^ true |
6182 | 708 |
|
709 |
"Modified: / 13.11.2001 / 13:28:15 / cg" |
|
6068
1d5ca1175f3f
added #isNilOrEmptyCollection
Claus Gittinger <cg@exept.de>
parents:
5796
diff
changeset
|
710 |
! |
1d5ca1175f3f
added #isNilOrEmptyCollection
Claus Gittinger <cg@exept.de>
parents:
5796
diff
changeset
|
711 |
|
16908
25523cfdfa62
added: Object>>isNotNil
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16721
diff
changeset
|
712 |
isNotNil |
20215 | 713 |
<resource: #obsolete> |
714 |
||
715 |
"Return true if the receiver is not nil. |
|
716 |
Since I am definitely nil, unconditionally return false here. |
|
16908
25523cfdfa62
added: Object>>isNotNil
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16721
diff
changeset
|
717 |
the receiver is definitely not nil here, so unconditionally return false." |
25523cfdfa62
added: Object>>isNotNil
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16721
diff
changeset
|
718 |
|
20215 | 719 |
self obsoleteMethodWarning:'use #notNil'. |
16908
25523cfdfa62
added: Object>>isNotNil
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16721
diff
changeset
|
720 |
^ false |
25523cfdfa62
added: Object>>isNotNil
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16721
diff
changeset
|
721 |
|
25523cfdfa62
added: Object>>isNotNil
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16721
diff
changeset
|
722 |
"Created: / 26-10-2014 / 01:30:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
25523cfdfa62
added: Object>>isNotNil
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16721
diff
changeset
|
723 |
! |
25523cfdfa62
added: Object>>isNotNil
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16721
diff
changeset
|
724 |
|
6932 | 725 |
notEmptyOrNil |
726 |
"Squeak compatibility: |
|
727 |
return true if I am neither nil nor an empty collection." |
|
728 |
||
729 |
^ false |
|
730 |
! |
|
731 |
||
695 | 732 |
notNil |
20215 | 733 |
"Return true if the receiver is not nil. |
9223 | 734 |
Since I am definitely nil, unconditionally return false here. |
3044 | 735 |
Notice: |
9223 | 736 |
This method is open coded (inlined) by the compiler(s) |
737 |
- redefining it may not work as expected." |
|
77 | 738 |
|
695 | 739 |
^ false |
77 | 740 |
! ! |
695 | 741 |
|
4652
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
742 |
!UndefinedObject methodsFor:'tracing'! |
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
743 |
|
4682 | 744 |
traceInto:aRequestor level:level from:referrer |
4652
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
745 |
"double dispatch into tracer, passing my type implicitely in the selector" |
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
746 |
|
4682 | 747 |
^ aRequestor traceUndefinedObject:self level:level from:referrer |
4652
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
748 |
|
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
749 |
|
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
750 |
! ! |
8b3118a923d1
added #hasSharedInstances & tracing support
Claus Gittinger <cg@exept.de>
parents:
4530
diff
changeset
|
751 |
|
8395
6bd97113cb4c
Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents:
8383
diff
changeset
|
752 |
!UndefinedObject methodsFor:'visiting'! |
6bd97113cb4c
Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents:
8383
diff
changeset
|
753 |
|
6bd97113cb4c
Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents:
8383
diff
changeset
|
754 |
acceptVisitor:aVisitor with:aParameter |
16721 | 755 |
"dispatch for visitor pattern; send #visitNil:with: to aVisitor." |
8395
6bd97113cb4c
Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents:
8383
diff
changeset
|
756 |
|
6bd97113cb4c
Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents:
8383
diff
changeset
|
757 |
^ aVisitor visitNilWith:aParameter |
6bd97113cb4c
Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents:
8383
diff
changeset
|
758 |
! ! |
6bd97113cb4c
Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents:
8383
diff
changeset
|
759 |
|
21316 | 760 |
|
695 | 761 |
!UndefinedObject class methodsFor:'documentation'! |
762 |
||
763 |
version |
|
18480 | 764 |
^ '$Header$' |
12968
07761a8bcc6a
comment/format in: #addDependent:
Claus Gittinger <cg@exept.de>
parents:
11821
diff
changeset
|
765 |
! |
07761a8bcc6a
comment/format in: #addDependent:
Claus Gittinger <cg@exept.de>
parents:
11821
diff
changeset
|
766 |
|
07761a8bcc6a
comment/format in: #addDependent:
Claus Gittinger <cg@exept.de>
parents:
11821
diff
changeset
|
767 |
version_CVS |
18480 | 768 |
^ '$Header$' |
25442
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
769 |
! |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
770 |
|
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
771 |
version_HG |
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
772 |
|
f909fb8f9b36
Cherry-picked `UndefinedObject >> #doIfNotNil:` from CVS
Jan Vrany <jan.vrany@labware.com>
parents:
23107
diff
changeset
|
773 |
^ '$Changeset: <not expanded> $' |
695 | 774 |
! ! |
6932 | 775 |
|
14678 | 776 |
|
2040
8ba8b1002902
avoid intermediate Object subclass creation.
Claus Gittinger <cg@exept.de>
parents:
1958
diff
changeset
|
777 |
UndefinedObject initialize! |