SimpleView.st
branchjv
changeset 7380 62f0b3e4fa9c
parent 7364 262ab56176cb
parent 7378 3f51596365af
child 7400 b583f17b4b39
--- a/SimpleView.st	Fri Jun 03 11:57:48 2016 +0100
+++ b/SimpleView.st	Mon Jun 06 12:38:55 2016 +0100
@@ -11265,9 +11265,12 @@
 	aWindowGroup notNil ifTrue:[aWindowGroup addTopView:self].
     ] ifFalse:[
 	previousGroup := WindowGroup activeGroup.
-
+    ].
+
+    windowGroup isNil ifTrue:[
 	"/ create a new window group put myself into it
-	windowGroup := self windowGroupClass new
+        windowGroup := self windowGroupClass new.
+        windowGroup 
 				addTopView:self;
 				setPreviousGroup:previousGroup.
 
@@ -11288,6 +11291,12 @@
 	(Dialog aboutToOpenBoxNotificationSignal raiseRequestWith:self) == #abort ifTrue:[
 	    ^ self
 	].
+        windowGroup isNil ifTrue:[
+            "/ the aboutToOpenBoxNotificationSignal handler destroyed me (although it should proceed with #abort)!!
+            "/ Transcript showCR:(self class name,': box opening suppressed by aboutToOpenBoxNotificationSignal handler').
+            ^ self.
+        ].
+
 	"/ the following allows for hooks to add a bell sound or other whenever a dialog opens
         device modalWindowListenersDo:[:listener | listener aboutToOpenWindow:self].