must release client first,
authorca
Tue, 08 Feb 2000 11:31:31 +0100
changeset 1686 bafa16adbf14
parent 1685 7755214df380
child 1687 70888239654f
must release client first, otherwise a wrong masterApp is set in the subApp.
SubCanvas.st
--- a/SubCanvas.st	Tue Feb 08 10:19:19 2000 +0100
+++ b/SubCanvas.st	Tue Feb 08 11:31:31 2000 +0100
@@ -78,6 +78,11 @@
 
     |myApp|
 
+    (client notNil and:[client ~~ anApplication]) ifTrue:[
+        client releaseAsSubCanvas.
+        client := nil.
+    ].
+
     (builder := aBuilder) isNil ifTrue:[
         builder := anApplication perform:#builder
                          ifNotUnderstood:[UIBuilder new]
@@ -93,9 +98,6 @@
         ]
     ].
 
-    (client notNil and:[client ~~ anApplication]) ifTrue:[
-        client releaseAsSubCanvas
-    ].
     client := anApplication.
     self rebuild.
     ^ builder
@@ -415,5 +417,5 @@
 !SubCanvas class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.22 2000-02-01 12:15:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.23 2000-02-08 10:31:31 ca Exp $'
 ! !