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