Message.st
changeset 14287 d172b79d6ebb
parent 10584 42caa67c49c4
child 17523 d921c9ecef2f
child 18011 deb0c3355881
equal deleted inserted replaced
14286:2998078bc2aa 14287:d172b79d6ebb
   217     "Created: / 31-05-2007 / 17:53:06 / cg"
   217     "Created: / 31-05-2007 / 17:53:06 / cg"
   218 ! !
   218 ! !
   219 
   219 
   220 !Message methodsFor:'printing & storing'!
   220 !Message methodsFor:'printing & storing'!
   221 
   221 
   222 displayString
   222 displayOn:aGCOrStream
   223     "return a string for display in inspectors etc."
   223     "Compatibility
   224 
   224      append a printed desription on some stream (Dolphin,  Squeak)
   225     ^ self class name , '(' , selector printString , ')'
   225      OR:
   226 
   226      display the receiver in a graphicsContext at 0@0 (ST80).
   227     "Modified: 28.10.1996 / 17:04:29 / cg"
   227      This method allows for any object to be displayed in some view
       
   228      (although the fallBack is to display its printString ...)"
       
   229 
       
   230     "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
       
   231     "/ ST/X (and some old ST80's) mean: draw-yourself on a GC.
       
   232     aGCOrStream isStream ifFalse:[
       
   233         ^ super displayOn:aGCOrStream.
       
   234     ].
       
   235 
       
   236     aGCOrStream 
       
   237         nextPutAll:self class name;
       
   238         nextPut:$(.
       
   239     selector storeOn:aGCOrStream. 
       
   240     aGCOrStream nextPut:$)
   228 !
   241 !
   229 
   242 
   230 printOn:aStream
   243 printOn:aStream
   231     "append a user printed representation of the receiver to aStream.
   244     "append a user printed representation of the receiver to aStream.
   232      The format is suitable for a human - not meant to be read back."
   245      The format is suitable for a human - not meant to be read back."
   256 ! !
   269 ! !
   257 
   270 
   258 !Message class methodsFor:'documentation'!
   271 !Message class methodsFor:'documentation'!
   259 
   272 
   260 version
   273 version
   261     ^ '$Header: /cvs/stx/stx/libbasic/Message.st,v 1.33 2007-05-31 15:51:35 cg Exp $'
   274     ^ '$Header: /cvs/stx/stx/libbasic/Message.st,v 1.34 2012-08-03 15:52:57 stefan Exp $'
   262 ! !
   275 ! !