allow redefinition of the displayed class name (displayString)
authorClaus Gittinger <cg@exept.de>
Tue, 02 Feb 1999 22:40:51 +0100
changeset 3964 a3129832fe16
parent 3963 a1ebd82e368c
child 3965 cef66fdfff9e
allow redefinition of the displayed class name (displayString)
Coll.st
Collection.st
--- a/Coll.st	Sat Jan 30 15:02:21 1999 +0100
+++ b/Coll.st	Tue Feb 02 22:40:51 1999 +0100
@@ -1390,7 +1390,7 @@
         ^ '#("recursive")'
     ].
 
-    string := (self class name) , '('.
+    string := self displayStringName , '('.
     noneYet := true.
     buffer := ''.
     count := 0.
@@ -1427,8 +1427,16 @@
                      at:#foo put:'bar'; yourself) displayString
     "
 
-    "Modified: / 28.1.1997 / 00:39:07 / cg"
     "Modified: / 20.1.1998 / 14:11:03 / stefan"
+    "Modified: / 2.2.1999 / 22:39:44 / cg"
+!
+
+displayStringName
+    "redefinable helper for displayString"
+
+    ^ (self class name)
+
+    "Created: / 2.2.1999 / 22:39:33 / cg"
 !
 
 maxPrint
@@ -1782,6 +1790,6 @@
 !Collection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Coll.st,v 1.81 1998-08-17 08:18:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Coll.st,v 1.82 1999-02-02 21:40:51 cg Exp $'
 ! !
 Collection initialize!
--- a/Collection.st	Sat Jan 30 15:02:21 1999 +0100
+++ b/Collection.st	Tue Feb 02 22:40:51 1999 +0100
@@ -1390,7 +1390,7 @@
         ^ '#("recursive")'
     ].
 
-    string := (self class name) , '('.
+    string := self displayStringName , '('.
     noneYet := true.
     buffer := ''.
     count := 0.
@@ -1427,8 +1427,16 @@
                      at:#foo put:'bar'; yourself) displayString
     "
 
-    "Modified: / 28.1.1997 / 00:39:07 / cg"
     "Modified: / 20.1.1998 / 14:11:03 / stefan"
+    "Modified: / 2.2.1999 / 22:39:44 / cg"
+!
+
+displayStringName
+    "redefinable helper for displayString"
+
+    ^ (self class name)
+
+    "Created: / 2.2.1999 / 22:39:33 / cg"
 !
 
 maxPrint
@@ -1782,6 +1790,6 @@
 !Collection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.81 1998-08-17 08:18:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.82 1999-02-02 21:40:51 cg Exp $'
 ! !
 Collection initialize!