--- a/CharacterArray.st Sun Jun 14 22:07:21 2009 +0200
+++ b/CharacterArray.st Sun Jun 14 22:08:04 2009 +0200
@@ -4061,10 +4061,32 @@
^ '''' , self , ''''
!
+displayOn:aGCOrStream
+ "Compatibility
+ append a printed desription on some stream (Dolphin, Squeak)
+ OR:
+ display the receiver in a graphicsContext at 0@0 (ST80).
+ This method allows for any object to be displayed in some view
+ (although the fallBack is to display its printString ...)"
+
+ "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
+ "/ ST/X (and some old ST80's) mean: draw-yourself on a GC.
+ (aGCOrStream isStream or:[aGCOrStream == Transcript]) ifTrue:[
+ self storeOn:aGCOrStream.
+ ^ self
+ ].
+ ^ super displayOn:aGCOrStream
+!
+
displayString
- "return a string to display the receiver - use storeString to have quotes around."
+ "return a string to display the receiver in a view (inspector).
+ Here, we use storeString to have quotes around."
^ self storeString
+
+ "
+ 'foo' displayString
+ "
!
printOn:aStream
@@ -5745,7 +5767,7 @@
!CharacterArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.395 2009-06-10 14:45:35 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.396 2009-06-14 20:08:04 cg Exp $'
! !
CharacterArray initialize!