--- a/NameSpace.st Fri Aug 03 17:52:47 2012 +0200
+++ b/NameSpace.st Fri Aug 03 17:52:51 2012 +0200
@@ -593,17 +593,30 @@
!NameSpace class methodsFor:'printing & storing'!
-displayString
+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 ifFalse:[
+ ^ super displayOn:aGCOrStream.
+ ].
+
"return a printed represenation - here, a reminder is appended,
that this is not a regular class"
self == NameSpace ifTrue:[
- ^ super displayString
+ super displayOn:aGCOrStream.
+ ] ifFalse:[
+ aGCOrStream
+ nextPutAll:self name;
+ nextPutAll:' (* NameSpace *)'.
].
- ^ self name , ' (* NameSpace *)'
-
- "Created: 8.11.1996 / 21:37:24 / cg"
- "Modified: 20.12.1996 / 15:11:31 / cg"
! !
!NameSpace class methodsFor:'private'!
@@ -721,7 +734,7 @@
!NameSpace class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.73 2012-03-23 10:56:21 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.74 2012-08-03 15:52:51 stefan Exp $'
!
version_SVN