--- a/ExternalBytes.st Tue Nov 09 13:54:57 2010 +0000
+++ b/ExternalBytes.st Tue Nov 09 16:24:28 2010 +0000
@@ -1058,22 +1058,33 @@
!ExternalBytes methodsFor:'printing & storing'!
-displayString
+displayOn:aGCOrStream
"return a printed representation of the receiver for displaying"
- |addr addrString|
+ |addr|
- (addr := self address) isNil ifTrue:[
- addrString := '[free]'
+ "/ 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 and:[aGCOrStream ~~ Transcript]) ifFalse:[
+ ^ super displayOn:aGCOrStream
+ ].
+
+ aGCOrStream nextPutAll:self className.
+ addr := self address.
+ addr isNil ifTrue:[
+ aGCOrStream nextPutAll:'[free]'.
] ifFalse:[
- size notNil ifTrue:[
- addrString := '[sz:', size printString, ' '
- ] ifFalse:[
- addrString := '['
- ].
- addrString := addrString , 'at:' , (addr printStringRadix:16), ']'
+ size notNil ifTrue:[
+ aGCOrStream nextPutAll:'[sz:'.
+ size printOn:aGCOrStream.
+ aGCOrStream space.
+ ] ifFalse:[
+ aGCOrStream nextPut:$[.
+ ].
+ aGCOrStream nextPutAll:'at:'.
+ addr printOn:aGCOrStream base:16.
+ aGCOrStream nextPut:$].
].
- ^ self class name , addrString
"Modified: / 24.2.2000 / 19:02:19 / cg"
! !
@@ -1279,15 +1290,15 @@
!ExternalBytes class methodsFor:'documentation'!
version
- ^ '$Id: ExternalBytes.st 10544 2010-07-12 16:20:36Z vranyj1 $'
+ ^ '$Id: ExternalBytes.st 10590 2010-11-09 16:24:28Z vranyj1 $'
!
version_CVS
- ^ 'Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.78 2010/04/08 11:57:17 cg Exp '
+ ^ 'Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.79 2010-09-21 06:57:43 stefan Exp '
!
version_SVN
- ^ '$Id: ExternalBytes.st 10544 2010-07-12 16:20:36Z vranyj1 $'
+ ^ '$Id: ExternalBytes.st 10590 2010-11-09 16:24:28Z vranyj1 $'
! !
ExternalBytes initialize!
@@ -1295,3 +1306,4 @@
+