author | Claus Gittinger <cg@exept.de> |
Wed, 26 Jun 2019 22:06:12 +0200 | |
changeset 24369 | e796791ea838 |
parent 22721 | 0649d8f051b0 |
child 24388 | 4f358c92d248 |
permissions | -rw-r--r-- |
22721 | 1 |
"{ Encoding: utf8 }" |
2 |
||
96 | 3 |
" |
4 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
344 | 5 |
All Rights Reserved |
96 | 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 |
" |
|
7781 | 14 |
"{ Package: 'stx:libbasic' }" |
5591 | 15 |
|
17696 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
96 | 18 |
Message subclass:#MessageSend |
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
19 |
instanceVariableNames:'receiver' |
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
20 |
classVariableNames:'' |
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
21 |
poolDictionaries:'' |
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
22 |
category:'Kernel-Methods' |
96 | 23 |
! |
24 |
||
25 |
!MessageSend class methodsFor:'documentation'! |
|
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
344 | 30 |
All Rights Reserved |
96 | 31 |
|
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
Instances of MessageSend can be used for simulation programs. |
|
44 |
They keep some receiver, selector and arguments and can be evaluated |
|
1269 | 45 |
at any time later. (basically, they are like MessageObjects, but keep |
46 |
the receiver in addition to the selector & arguments). |
|
47 |
||
96 | 48 |
They can also be used as replacement for simple [self foo]-blocks. |
49 |
Of course, they could also be replaced by blocks such as |
|
50 |
'[receiver perform:selector withArguments:arguments]', |
|
344 | 51 |
but blocks are somewhat more expensive in their creation and require |
52 |
more storage. |
|
53 |
||
1269 | 54 |
If you plan to write a simulator and want to queue cillions of blocks, |
55 |
try to use MessageSends instead of blocks |
|
56 |
(or even: message, if the receiver is constant); |
|
57 |
this will save you a lot of memory. |
|
58 |
||
96 | 59 |
However, the send-operation itself is faster in a block, since it |
60 |
will use a better caching scheme (inline-cache) for its send, while |
|
61 |
sending here is done with a #perform:, which is not inline-cached. |
|
1269 | 62 |
Also, blocks are more flexible, in that they allow access to local |
63 |
variables of the defining method - and work without a need to define an |
|
64 |
extra visited method (read literature on visitor patterns). |
|
65 |
||
363 | 66 |
Thus it is not sure, which one is actually better to use ... |
67 |
||
68 |
You can either store arguments in the messageSend object, or |
|
69 |
leave them undefined until the send is actually performed, and |
|
70 |
pass any arguments with the value:-messages. |
|
1270 | 71 |
|
72 |
[See also:] |
|
73 |
Block Message |
|
1293 | 74 |
|
75 |
[author:] |
|
76 |
Claus Gittinger |
|
1269 | 77 |
" |
78 |
! |
|
96 | 79 |
|
1269 | 80 |
examples |
81 |
" |
|
96 | 82 |
Example: |
83 |
|m| |
|
84 |
||
85 |
m := MessageSend receiver:1 selector:#+ arguments:#(2). |
|
363 | 86 |
m value. |
96 | 87 |
|
1316 | 88 |
|
89 |
||
1269 | 90 |
is almost the same as: |
344 | 91 |
|m| |
92 |
||
93 |
m := [1+2]. |
|
363 | 94 |
m value. |
344 | 95 |
|
96 |
||
1269 | 97 |
|
96 | 98 |
Example2 (a simulation) |
1269 | 99 |
|q| |
96 | 100 |
|
1269 | 101 |
q := Queue new. |
102 |
... |
|
103 |
'put some action into the queue' |
|
104 |
q nextPut:(MessageSend receiver:someone selector:#foo arguments:#(). |
|
105 |
... |
|
106 |
'evaluate next action from the queue' |
|
107 |
q next value |
|
108 |
... |
|
344 | 109 |
|
110 |
if all sends are going to the same receiver, use: |
|
1269 | 111 |
|q| |
344 | 112 |
|
1269 | 113 |
q := Queue new. |
114 |
... |
|
115 |
'put some action into the queue' |
|
116 |
q nextPut:(Message selector:#foo arguments:#(). |
|
117 |
... |
|
118 |
'evaluate next action from the queue' |
|
119 |
q next sendTo:someone |
|
120 |
... |
|
96 | 121 |
" |
122 |
! ! |
|
123 |
||
124 |
!MessageSend class methodsFor:'instance creation'! |
|
125 |
||
2473 | 126 |
receiver:r selector:sel |
127 |
"create & return a new instance which can be used to |
|
128 |
send sel to some receiver, r" |
|
129 |
||
130 |
^ self receiver:r selector:sel arguments:nil |
|
131 |
||
132 |
" |
|
133 |
(MessageSend receiver:nil selector:#foo) value |
|
134 |
" |
|
135 |
||
136 |
"Modified: 20.3.1997 / 21:55:16 / cg" |
|
137 |
! |
|
138 |
||
5669 | 139 |
receiver:r selector:sel argument:something |
140 |
"create & return a new instance which can be used to |
|
141 |
send sel with arguments to some receiver, r" |
|
142 |
||
143 |
^ self receiver:r selector:sel arguments:(Array with:something) |
|
144 |
||
145 |
" |
|
146 |
(MessageSend receiver:nil selector:#foo: argument:1) value |
|
147 |
" |
|
148 |
! |
|
149 |
||
96 | 150 |
receiver:r selector:sel arguments:argArray |
1269 | 151 |
"create & return a new instance which can be used to |
152 |
send sel with arguments to some receiver, r" |
|
153 |
||
96 | 154 |
|newMessage| |
155 |
||
344 | 156 |
newMessage := super new setSelector:sel arguments:argArray. |
96 | 157 |
newMessage receiver:r. |
158 |
^ newMessage |
|
1269 | 159 |
|
2473 | 160 |
" |
161 |
(MessageSend receiver:nil selector:#foo: arguments:#(1)) value |
|
162 |
" |
|
163 |
||
164 |
"Modified: 20.3.1997 / 21:55:44 / cg" |
|
96 | 165 |
! ! |
166 |
||
16535
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
167 |
!MessageSend methodsFor:'Compatibility-Squeak'! |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
168 |
|
17696 | 169 |
cull: optionalFirstArg |
170 |
"activate the receiver with one or zero arguments. |
|
171 |
Squeak compatibility, but also present in VW Smalltalk" |
|
16535
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
172 |
|
17696 | 173 |
selector numArgs >= 1 ifTrue:[^ self value:optionalFirstArg]. |
16535
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
174 |
^ self value |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
175 |
|
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
176 |
"Modified: / 03-06-2014 / 12:40:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
177 |
! |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
178 |
|
17696 | 179 |
cull: optionalFirstArg cull: optionalSecondArg |
180 |
"activate the receiver with two or less arguments. |
|
181 |
Squeak compatibility, but also present in VW Smalltalk" |
|
16535
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
182 |
|
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
183 |
| nargs | |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
184 |
|
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
185 |
nargs := selector numArgs. |
17696 | 186 |
nargs >= 2 ifTrue:[^ self value:optionalFirstArg value:optionalSecondArg]. |
187 |
nargs = 1 ifTrue:[^ self value:optionalFirstArg]. |
|
16535
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
188 |
^ self value |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
189 |
|
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
190 |
"Modified (format): / 03-06-2014 / 12:40:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
191 |
! |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
192 |
|
17696 | 193 |
cull: firstArg cull: optionalSecondArg cull: optionalThirdArg |
194 |
"activate the receiver with three or less arguments. |
|
195 |
Squeak compatibility, but also present in VW Smalltalk" |
|
16535
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
196 |
|
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
197 |
| nargs | |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
198 |
|
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
199 |
nargs := selector numArgs. |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
200 |
nargs >= 2 ifTrue:[ |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
201 |
nargs >= 3 ifTrue:[ |
17696 | 202 |
^ self value:firstArg value:optionalSecondArg value:optionalThirdArg |
16535
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
203 |
]. |
17696 | 204 |
^ self value:firstArg value:optionalSecondArg |
16535
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
205 |
]. |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
206 |
nargs = 1 ifTrue:[^ self value:firstArg]. |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
207 |
^ self value |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
208 |
|
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
209 |
"Modified: / 03-06-2014 / 12:40:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
210 |
! ! |
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
211 |
|
13184 | 212 |
!MessageSend methodsFor:'Compatibility-V''Age'! |
213 |
||
214 |
evaluate |
|
215 |
^ self value |
|
216 |
||
217 |
"Created: / 22-12-2010 / 12:59:25 / cg" |
|
218 |
! |
|
219 |
||
220 |
evaluateWith:someArgument |
|
221 |
^ self value:someArgument |
|
222 |
||
223 |
"Created: / 22-12-2010 / 13:50:33 / cg" |
|
224 |
! |
|
225 |
||
226 |
evaluateWithArguments:argArray |
|
227 |
^ self valueWithArguments:argArray |
|
228 |
||
229 |
"Created: / 22-12-2010 / 12:59:42 / cg" |
|
230 |
! ! |
|
231 |
||
8688
c3de1df6642a
Define #argumentCount as ANSI alias for #numArgs
Stefan Vogel <sv@exept.de>
parents:
8581
diff
changeset
|
232 |
!MessageSend methodsFor:'accessing'! |
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
233 |
|
8688
c3de1df6642a
Define #argumentCount as ANSI alias for #numArgs
Stefan Vogel <sv@exept.de>
parents:
8581
diff
changeset
|
234 |
argumentCount |
c3de1df6642a
Define #argumentCount as ANSI alias for #numArgs
Stefan Vogel <sv@exept.de>
parents:
8581
diff
changeset
|
235 |
"VisualAge/ANSI compatibility: return the number of arguments of the message" |
1269 | 236 |
|
8688
c3de1df6642a
Define #argumentCount as ANSI alias for #numArgs
Stefan Vogel <sv@exept.de>
parents:
8581
diff
changeset
|
237 |
^ selector argumentCount |
c3de1df6642a
Define #argumentCount as ANSI alias for #numArgs
Stefan Vogel <sv@exept.de>
parents:
8581
diff
changeset
|
238 |
|
c3de1df6642a
Define #argumentCount as ANSI alias for #numArgs
Stefan Vogel <sv@exept.de>
parents:
8581
diff
changeset
|
239 |
"Modified: 23.4.1996 / 16:52:51 / cg" |
c3de1df6642a
Define #argumentCount as ANSI alias for #numArgs
Stefan Vogel <sv@exept.de>
parents:
8581
diff
changeset
|
240 |
! |
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
241 |
|
8581 | 242 |
numArgs |
243 |
"return the number of arguments of the message" |
|
244 |
||
245 |
^ selector numArgs |
|
246 |
||
247 |
"Modified: 23.4.1996 / 16:52:51 / cg" |
|
248 |
! |
|
249 |
||
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
250 |
receiver |
1269 | 251 |
"return the receiver of the message" |
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
252 |
|
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
253 |
^ receiver |
1269 | 254 |
|
255 |
"Modified: 23.4.1996 / 16:52:59 / cg" |
|
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
256 |
! |
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
257 |
|
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
258 |
receiver:r |
1269 | 259 |
"set the receiver of the message" |
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
260 |
|
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
261 |
receiver := r |
1269 | 262 |
|
263 |
"Modified: 23.4.1996 / 16:53:04 / cg" |
|
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
264 |
! ! |
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
265 |
|
96 | 266 |
!MessageSend methodsFor:'evaluation'! |
267 |
||
268 |
value |
|
160 | 269 |
"evaluate the messagesend with the original arguments" |
96 | 270 |
|
271 |
^ receiver perform:selector withArguments:args |
|
272 |
! |
|
273 |
||
274 |
value:someArgument |
|
275 |
"evaluate the messagesend, with someArgument instead of the original" |
|
13058 | 276 |
|
277 |
^ receiver perform:selector withOptionalArgument:someArgument |
|
278 |
||
279 |
"Modified: / 14-09-2010 / 16:04:39 / cg" |
|
96 | 280 |
! |
281 |
||
282 |
value:arg1 value:arg2 |
|
160 | 283 |
"evaluate the messagesend, with arg1 and arg2 instead of the original |
284 |
arguments" |
|
96 | 285 |
|
13058 | 286 |
^ receiver perform:selector withOptionalArgument:arg1 and:arg2 |
287 |
||
288 |
"Modified: / 14-09-2010 / 16:04:58 / cg" |
|
96 | 289 |
! |
290 |
||
291 |
value:arg1 value:arg2 value:arg3 |
|
160 | 292 |
"evaluate the messagesend, with arg1, arg2 and arg3 instead of the original |
293 |
arguments" |
|
96 | 294 |
|
8580 | 295 |
^ receiver perform:selector with:arg1 with:arg2 with:arg3 |
363 | 296 |
! |
297 |
||
298 |
valueWithArguments:argArray |
|
299 |
"evaluate the messagesend, with arguments taken from argArray, |
|
300 |
instead of the original arguments" |
|
301 |
||
8580 | 302 |
^ receiver perform:selector withArguments:argArray |
11417 | 303 |
! |
304 |
||
305 |
valueWithOptionalArgument:arg |
|
306 |
"evaluate the messagesend. |
|
307 |
Optionally pass an argument (if the selector is for a one arg message)." |
|
308 |
||
309 |
^ receiver perform:selector withOptionalArgument:arg |
|
310 |
! |
|
311 |
||
312 |
valueWithOptionalArgument:arg1 and:arg2 |
|
313 |
"evaluate the messagesend. |
|
314 |
Optionally pass up to two arguments." |
|
315 |
||
316 |
^ receiver perform:selector withOptionalArgument:arg1 and:arg2 |
|
96 | 317 |
! ! |
318 |
||
319 |
!MessageSend methodsFor:'printing & storing'! |
|
320 |
||
14290
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
321 |
displayOn:aGCOrStream |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
322 |
"Compatibility |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
323 |
append a printed desription on some stream (Dolphin, Squeak) |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
324 |
OR: |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
325 |
display the receiver in a graphicsContext at 0@0 (ST80). |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
326 |
This method allows for any object to be displayed in some view |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
327 |
(although the fallBack is to display its printString ...)" |
96 | 328 |
|
14290
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
329 |
"/ what a kludge - Dolphin and Squeak mean: printOn: a stream; |
21531 | 330 |
"/ old ST80 means: draw-yourself on a GC. |
14290
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
331 |
aGCOrStream isStream ifFalse:[ |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
332 |
^ super displayOn:aGCOrStream. |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
333 |
]. |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
334 |
|
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
335 |
aGCOrStream |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
336 |
nextPutAll:self class name; |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
337 |
nextPut:$(. |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
338 |
receiver displayOn:aGCOrStream. |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
339 |
aGCOrStream nextPutAll:'>>'. |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
340 |
selector storeOn:aGCOrStream. |
1561011a34fd
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
13184
diff
changeset
|
341 |
aGCOrStream nextPut:$) |
21531 | 342 |
|
343 |
"Modified (comment): / 22-02-2017 / 16:48:49 / cg" |
|
96 | 344 |
! |
345 |
||
346 |
printOn:aStream |
|
4392 | 347 |
"append a user printed representation of the receiver to aStream. |
348 |
The format is suitable for a human - not meant to be read back." |
|
96 | 349 |
|
350 |
receiver printOn:aStream. |
|
351 |
aStream nextPutAll:'>>'. |
|
352 |
selector printOn:aStream |
|
1269 | 353 |
|
354 |
"Modified: 23.4.1996 / 16:53:35 / cg" |
|
96 | 355 |
! ! |
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
356 |
|
22721 | 357 |
!MessageSend methodsFor:'testing'! |
358 |
||
359 |
isBlockOrMessageSend |
|
360 |
^ true |
|
361 |
! ! |
|
362 |
||
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
363 |
!MessageSend class methodsFor:'documentation'! |
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
364 |
|
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
365 |
version |
21531 | 366 |
^ '$Header$' |
13058 | 367 |
! |
368 |
||
369 |
version_CVS |
|
21531 | 370 |
^ '$Header$' |
1183
e3d58d115e53
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
371 |
! ! |
16535
7e7955b07b1f
Added MessageSend>>#cull:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14290
diff
changeset
|
372 |