CharacterArray.st
changeset 11774 6f6e2b71b607
parent 11754 5132248cfd6e
child 11788 eea1835a1b7b
child 17711 39faaaf888b4
equal deleted inserted replaced
11773:ac4ceea3f464 11774:6f6e2b71b607
  4059     ].
  4059     ].
  4060 
  4060 
  4061     ^ '''' , self , ''''
  4061     ^ '''' , self , ''''
  4062 !
  4062 !
  4063 
  4063 
       
  4064 displayOn:aGCOrStream
       
  4065     "Compatibility
       
  4066      append a printed desription on some stream (Dolphin,  Squeak)
       
  4067      OR:
       
  4068      display the receiver in a graphicsContext at 0@0 (ST80).
       
  4069      This method allows for any object to be displayed in some view
       
  4070      (although the fallBack is to display its printString ...)"
       
  4071 
       
  4072     "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
       
  4073     "/ ST/X (and some old ST80's) mean: draw-yourself on a GC.
       
  4074     (aGCOrStream isStream or:[aGCOrStream == Transcript]) ifTrue:[
       
  4075         self storeOn:aGCOrStream.
       
  4076         ^ self
       
  4077     ].
       
  4078     ^ super displayOn:aGCOrStream
       
  4079 !
       
  4080 
  4064 displayString
  4081 displayString
  4065     "return a string to display the receiver - use storeString to have quotes around."
  4082     "return a string to display the receiver in a view (inspector).
       
  4083      Here, we use storeString to have quotes around."
  4066 
  4084 
  4067     ^ self storeString
  4085     ^ self storeString
       
  4086 
       
  4087     "
       
  4088      'foo' displayString 
       
  4089     "
  4068 !
  4090 !
  4069 
  4091 
  4070 printOn:aStream
  4092 printOn:aStream
  4071     "print the receiver on aStream"
  4093     "print the receiver on aStream"
  4072 
  4094 
  5743 ! !
  5765 ! !
  5744 
  5766 
  5745 !CharacterArray class methodsFor:'documentation'!
  5767 !CharacterArray class methodsFor:'documentation'!
  5746 
  5768 
  5747 version
  5769 version
  5748     ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.395 2009-06-10 14:45:35 stefan Exp $'
  5770     ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.396 2009-06-14 20:08:04 cg Exp $'
  5749 ! !
  5771 ! !
  5750 
  5772 
  5751 CharacterArray initialize!
  5773 CharacterArray initialize!