MessageSend.st
changeset 14290 1561011a34fd
parent 13184 3a98fb1116bf
child 16535 7e7955b07b1f
child 18011 deb0c3355881
equal deleted inserted replaced
14289:1b8f3e94952a 14290:1561011a34fd
   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."
   287 ! !
   304 ! !
   288 
   305 
   289 !MessageSend class methodsFor:'documentation'!
   306 !MessageSend class methodsFor:'documentation'!
   290 
   307 
   291 version
   308 version
   292     ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.23 2010-12-22 12:50:41 cg Exp $'
   309     ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.24 2012-08-03 15:53:30 stefan Exp $'
   293 !
   310 !
   294 
   311 
   295 version_CVS
   312 version_CVS
   296     ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.23 2010-12-22 12:50:41 cg Exp $'
   313     ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.24 2012-08-03 15:53:30 stefan Exp $'
   297 ! !
   314 ! !