267 ^ receiver perform:selector withOptionalArgument:arg1 and:arg2 |
267 ^ receiver perform:selector withOptionalArgument:arg1 and:arg2 |
268 ! ! |
268 ! ! |
269 |
269 |
270 !MessageSend methodsFor:'printing & storing'! |
270 !MessageSend methodsFor:'printing & storing'! |
271 |
271 |
272 displayString |
272 displayOn:aGCOrStream |
273 "return a string for display in inspectors etc." |
273 "Compatibility |
274 |
274 append a printed desription on some stream (Dolphin, Squeak) |
275 ^ self class name , '(' , receiver displayString , '>>' , selector , ')' |
275 OR: |
|
276 display the receiver in a graphicsContext at 0@0 (ST80). |
|
277 This method allows for any object to be displayed in some view |
|
278 (although the fallBack is to display its printString ...)" |
|
279 |
|
280 "/ what a kludge - Dolphin and Squeak mean: printOn: a stream; |
|
281 "/ ST/X (and some old ST80's) mean: draw-yourself on a GC. |
|
282 aGCOrStream isStream ifFalse:[ |
|
283 ^ super displayOn:aGCOrStream. |
|
284 ]. |
|
285 |
|
286 aGCOrStream |
|
287 nextPutAll:self class name; |
|
288 nextPut:$(. |
|
289 receiver displayOn:aGCOrStream. |
|
290 aGCOrStream nextPutAll:'>>'. |
|
291 selector storeOn:aGCOrStream. |
|
292 aGCOrStream nextPut:$) |
276 ! |
293 ! |
277 |
294 |
278 printOn:aStream |
295 printOn:aStream |
279 "append a user printed representation of the receiver to aStream. |
296 "append a user printed representation of the receiver to aStream. |
280 The format is suitable for a human - not meant to be read back." |
297 The format is suitable for a human - not meant to be read back." |