checkin from browser
authortm
Wed, 14 Jul 1999 12:45:23 +0200
changeset 1450 9994adae5c1c
parent 1449 e5852c20c18a
child 1451 85e0df1771e5
checkin from browser
SubCanvas.st
--- a/SubCanvas.st	Tue Jul 13 23:23:15 1999 +0200
+++ b/SubCanvas.st	Wed Jul 14 12:45:23 1999 +0200
@@ -130,6 +130,12 @@
 
 !
 
+setClient:anApplicationModel
+    "set the client - do NOT rebuild"
+
+    client := anApplicationModel 
+!
+
 spec
     "return the value of the instance variable 'spec' (automatically generated)"
 
@@ -223,9 +229,11 @@
         "/:
         savedView := builder window.
         builder window:clientView.
-        client buildSubCanvas:subSpec withBuilder:builder.
-        builder window:savedView.
-
+        [
+            client buildSubCanvas:subSpec withBuilder:builder.
+        ] valueNowOrOnUnwindDo:[
+            builder window:savedView.
+        ].
         clientViewIsScrolled ifTrue:[
             clientView
                 extent:(builder spec window layout rectangleRelativeTo:self bounds preferred:nil) extent.
@@ -278,6 +286,9 @@
     (client notNil and:[spec notNil]) ifTrue:[
         self client:client spec:spec
     ] ifFalse:[
+        spec notNil ifTrue:[
+            self halt:'spec but no app'.
+        ].
         self client:nil
     ]
 
@@ -324,5 +335,5 @@
 !SubCanvas class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.13 1999-06-17 08:51:17 tm Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.14 1999-07-14 10:45:23 tm Exp $'
 ! !