*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Tue, 31 Jan 2006 23:27:10 +0100
changeset 9086 cd770483c45d
parent 9085 277621b7f38a
child 9087 9e28a6168468
*** empty log message ***
ArrayedCollection.st
Collection.st
Set.st
--- a/ArrayedCollection.st	Tue Jan 31 23:10:09 2006 +0100
+++ b/ArrayedCollection.st	Tue Jan 31 23:27:10 2006 +0100
@@ -397,7 +397,7 @@
      - you should write your collection classes to avoid the use of become. 
      You have been warned."
 
-    |newArray oldSize sender|
+    |newArray oldSize|
 
     oldSize := self size.
     (newSize ~~ oldSize) ifTrue:[
@@ -407,11 +407,9 @@
             "/ to use some collection which implements grow: more efficient
             "/ (i.e. use OrderedCollection instead of Array ..)
             "/
-            'ArrayedCollection [info]: slow grow operation (' infoPrint.
-            self class name infoPrint. ') via ' infoPrint.
-            sender := thisContext sender.
-            sender methodPrintString infoPrint. 
-            ' from ' infoPrint. sender sender methodPrintString infoPrintCR.
+            'ArrayedCollection [warning]: slow grow operation (' errorPrint.
+            self class name infoPrint. ') ' errorPrintCR.
+            self showWhereWeCameFrom.
         ].
 
         newArray := self species new:newSize.
@@ -458,5 +456,5 @@
 !ArrayedCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.54 2005-06-27 10:24:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.55 2006-01-31 22:27:02 cg Exp $'
 ! !
--- a/Collection.st	Tue Jan 31 23:10:09 2006 +0100
+++ b/Collection.st	Tue Jan 31 23:27:10 2006 +0100
@@ -2167,6 +2167,33 @@
      since not enough elements are in the collection"
 
     ^ NotEnoughElementsSignal raise
+!
+
+showWhereWeCameFrom
+    |con|
+
+    con := thisContext sender sender.
+    ('         from ' , con printString) errorPrintCR.
+    con := con sender.
+    con notNil ifTrue:[
+        ('         from ' , con printString) errorPrintCR.
+        con := con sender.
+        con notNil ifTrue:[
+            ('         from ' , con printString) errorPrintCR.
+            con receiver isCollection ifTrue:[
+                con := con sender.
+                con notNil ifTrue:[
+                    ('         from ' , con printString) errorPrintCR.
+                    con receiver isCollection ifTrue:[
+                        con := con sender.
+                        con notNil ifTrue:[
+                            ('         from ' , con printString) errorPrintCR.
+                        ].
+                    ].
+                ].
+            ].
+        ]
+    ].
 ! !
 
 !Collection methodsFor:'growing'!
@@ -2892,7 +2919,7 @@
 !Collection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.182 2006-01-27 14:53:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.183 2006-01-31 22:27:10 cg Exp $'
 ! !
 
 Collection initialize!
--- a/Set.st	Tue Jan 31 23:10:09 2006 +0100
+++ b/Set.st	Tue Jan 31 23:27:10 2006 +0100
@@ -798,18 +798,9 @@
 
     "/ self elementBoundError.
 
-    |con|
-
-    'Set [warning]: nil is not a valid element - will be an error in later versions' errorPrintCR.
-    con := thisContext sender.
-    ('         from ' , con printString) errorPrintCR.
-    con := con sender.
-    con notNil ifTrue:[
-	('         from ' , con printString) errorPrintCR.
-	con := con sender.
-	con notNil ifTrue:[
-	    ('         from ' , con printString) errorPrintCR.
-	]
+    InfoPrinting ifTrue:[
+        'Set [warning]: nil is not a valid element - will be an error in later versions' errorPrintCR.
+        self showWhereWeCameFrom.
     ].
 !
 
@@ -1169,7 +1160,7 @@
 !Set class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.92 2005-04-08 22:54:37 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.93 2006-01-31 22:26:56 cg Exp $'
 ! !
 
 Set initialize!