TextCollector.st
changeset 4965 cf490f1f21c6
parent 4963 360430ca651c
child 5025 8db08f1414fb
child 5085 52e9f87d45c8
--- a/TextCollector.st	Thu Mar 20 18:50:55 2014 +0100
+++ b/TextCollector.st	Thu Mar 20 23:58:27 2014 +0100
@@ -385,8 +385,7 @@
     flushPending := inFlush := false.
     collecting := true.
     timeDelay := self class defaultTimeDelay.
-    access := RecursionLock new. "/ Semaphore forMutualExclusion.
-    access name:'TextCollector access lock'.
+    access := RecursionLock new name:'TextCollector access lock'.
 
     lineLimit := self class defaultLineLimit.
     entryStream := ActorStream new.
@@ -1017,10 +1016,23 @@
 
     |nLines lines device|
 
-    ((outstandingLines size == 0) and:[outstandingLine size == 0]) ifTrue:[
+    ((outstandingLines isEmptyOrNil) and:[outstandingLine isEmptyOrNil]) ifTrue:[
         "/ self ~~ Transcript ifTrue:[ 'e- ' print. thisContext sender selector printCR ].
         ^ self
     ].
+    shown ifFalse:[
+        "/ when iconified or not yet shown, keep
+        "/ collecting. But not too much ...
+        outstandingLines size < 300 ifTrue:[
+            "/ self ~~ Transcript ifTrue:[ 'eC' printCR ].
+            access critical:[
+                flushPending ifFalse:[
+                    self installDelayedUpdate.
+                ].
+            ].
+            ^ self
+        ]
+    ].
 
     device := self graphicsDevice.
     (device isNil or:[device isOpen not or:[self drawableId isNil]]) ifTrue:[
@@ -1043,19 +1055,6 @@
     "/ self ~~ Transcript ifTrue:[ 'e ' print. 
     "/    thisContext fullPrintAll.
     "/ ].
-    shown ifFalse:[
-        "/ when iconified or not yet shown, keep
-        "/ collecting. But not too much ...
-        outstandingLines size < 300 ifTrue:[
-            "/ self ~~ Transcript ifTrue:[ 'eC' printCR ].
-            access critical:[
-                flushPending ifFalse:[
-                    self installDelayedUpdate.
-                ].
-            ].
-            ^ self
-        ]
-    ].
 
 "/    access owner == Processor activeProcess ifTrue:[
 "/self ~~ Transcript ifTrue:[ 'eI' printCR ].
@@ -1143,11 +1142,11 @@
 !TextCollector class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.133 2014-03-20 17:03:13 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.134 2014-03-20 22:58:27 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.133 2014-03-20 17:03:13 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.134 2014-03-20 22:58:27 stefan Exp $'
 ! !