subApp-channel support;
authorClaus Gittinger <cg@exept.de>
Mon, 31 Jan 2000 16:47:52 +0100
changeset 1662 b5ab432da3b9
parent 1661 3a2a038e4173
child 1663 d8a1a6a12a67
subApp-channel support; FIX: makeScrollable must be done earlier in #rebuild, to avoid destroying the newly created view. (when no client/spec channel is used)
SubCanvas.st
--- a/SubCanvas.st	Mon Jan 31 16:32:54 2000 +0100
+++ b/SubCanvas.st	Mon Jan 31 16:47:52 2000 +0100
@@ -105,8 +105,9 @@
     |vs|
 
     aBoolean ~~ clientViewIsScrolled ifTrue:[
-        clientView := View new.
-
+        clientView isNil ifTrue:[
+            clientView := View new.
+        ].
         aBoolean ifTrue:[
             self scrolledView:(vs := ViewScroller new).
             vs scrolledView:clientView.
@@ -116,6 +117,7 @@
         clientViewIsScrolled := aBoolean.
     ]
 
+    "Modified: / 30.1.2000 / 21:36:29 / cg"
 !
 
 setClient:anApplicationModel
@@ -278,6 +280,9 @@
                 ^ self
             ]
         ].
+        subSpec isArray ifTrue:[
+            subSpec := subSpec decodeAsLiteralArray
+        ].
 
         builder isNil ifTrue:[
             client isNil ifTrue:[
@@ -299,18 +304,20 @@
         [
             client buildSubCanvas:subSpec withBuilder:builder.
         ] valueNowOrOnUnwindDo:[
-            builder window:savedView.
+            savedView notNil ifTrue:[
+                builder window:savedView.
+            ]
         ].
-        clientViewIsScrolled ifTrue:[
+"/        clientViewIsScrolled ifTrue:[
             clientView extent:((subSpec window layout) ? (subSpec window bounds)) extent.
-        ].
+"/        ].
 
         self realized ifTrue:[
             clientView realizeAllSubViews
-        ]
+        ].
     ]
 
-    "Modified: / 20.6.1998 / 14:29:00 / cg"
+    "Modified: / 30.1.2000 / 21:36:40 / cg"
 !
 
 releaseAllComponents
@@ -318,6 +325,8 @@
     builder := nil.
     spec    := nil.
     client  := nil.
+
+    "Modified: / 31.1.2000 / 16:56:14 / cg"
 ! !
 
 !SubCanvas methodsFor:'change & update'!
@@ -382,11 +391,12 @@
 initialize
 
     super initialize.
-
     self scrolledView:(clientView := View new).
     clientViewIsScrolled := false.
 
     spec := #windowSpec.
+
+    "Modified: / 31.1.2000 / 16:56:31 / cg"
 ! !
 
 !SubCanvas methodsFor:'queries'!
@@ -405,5 +415,5 @@
 !SubCanvas class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.20 1999-10-11 17:45:57 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.21 2000-01-31 15:47:52 cg Exp $'
 ! !