*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Wed, 11 Feb 2009 12:43:05 +0100
changeset 2594 b59b02924f4f
parent 2593 c12772fa8d0d
child 2595 37dc71e1e59b
*** empty log message ***
ExternalTopView.st
--- a/ExternalTopView.st	Wed Feb 11 12:40:47 2009 +0100
+++ b/ExternalTopView.st	Wed Feb 11 12:43:05 2009 +0100
@@ -13,7 +13,7 @@
 
 TopView subclass:#ExternalTopView
 	instanceVariableNames:'windowClosedPollProcess'
-	classVariableNames:''
+	classVariableNames:'ErrorPrinting'
 	poolDictionaries:''
 	category:'Views-Basic'
 !
@@ -66,6 +66,14 @@
     ^ self new setWindowID:anAlienWindowID
 ! !
 
+!ExternalTopView class methodsFor:'accessing'!
+
+errorPrinting:something
+    "controls errorprinting while checking for alive connection"
+
+    ErrorPrinting := something.
+! !
+
 !ExternalTopView methodsFor:'private'!
 
 alienViewHasBeenDestroyed
@@ -81,25 +89,10 @@
     "check for a destroyed topView 
      (must poll, since we do not get any events from X for the alien topView)"
 
-    ^  self checkWindowStillAliveWithErrorPrinting:true
-!
-
-checkWindowStillAliveLoop
-    [self checkWindowStillAlive] whileTrue:[
-        Delay waitForSeconds:0.5.
-    ].
-
-    self alienViewHasBeenDestroyed
-!
-
-checkWindowStillAliveWithErrorPrinting:errorPrinting
-    "check for a destroyed topView 
-     (must poll, since we do not get any events from X for the alien topView)"
-
     |prevHandler stillAlive prevErrorPrintingFlag|
 
     prevErrorPrintingFlag := device class errorPrinting.
-    device class errorPrinting:errorPrinting.
+    device class errorPrinting:(ErrorPrinting ? true).
 
     drawableId notNil ifTrue:[
         stillAlive := device isValidWindowId:drawableId.
@@ -113,6 +106,14 @@
     ^ stillAlive.
 !
 
+checkWindowStillAliveLoop
+    [self checkWindowStillAlive] whileTrue:[
+        Delay waitForSeconds:0.5.
+    ].
+
+    self alienViewHasBeenDestroyed
+!
+
 startWindowClosedPollProcess
     windowClosedPollProcess isNil ifTrue:[
         windowClosedPollProcess := 
@@ -316,5 +317,5 @@
 !ExternalTopView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ExternalTopView.st,v 1.16 2009-02-11 11:40:47 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ExternalTopView.st,v 1.17 2009-02-11 11:43:05 cg Exp $'
 ! !