client:spec:builder: postBuild is not invoked
authorca
Wed, 09 Aug 2000 10:46:16 +0200
changeset 3251 10e2a75ecb51
parent 3250 250ee58a0634
child 3252 f9d3d0926ff5
client:spec:builder: postBuild is not invoked
SimpleView.st
--- a/SimpleView.st	Sat Aug 05 14:03:31 2000 +0200
+++ b/SimpleView.st	Wed Aug 09 10:46:16 2000 +0200
@@ -3242,7 +3242,8 @@
 
 client:anApplicationModel
     "release existing components and generate new components from
-     the applications windowSpec."
+     the applications windowSpec.
+     ATTENTION: this is a low level interface; postBuild is NOT invoked"
 
     ^ self client:anApplicationModel spec:#windowSpec
 
@@ -3251,7 +3252,8 @@
 
 client:anApplication spec:aWindowSpecOrSelector
     "release existing components and generate new components from
-     the applications windowSpec."
+     the applications windowSpec.
+     ATTENTION: this is a low level interface; postBuild is NOT invoked"
 
   ^ self client:anApplication spec:aWindowSpecOrSelector builder:nil
 
@@ -3259,7 +3261,8 @@
 
 client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder
     "release existing components and generate new components from
-     the given windowSpec, using the given builder."
+     the given windowSpec, using the given builder.
+     ATTENTION: this is a low level interface; postBuild is NOT invoked"
 
     |builder subSpec notAnAppModel savedView|
 
@@ -3287,20 +3290,25 @@
             ^ self
         ].
     ].
-
-    notAnAppModel ifTrue:[
-        builder buildFromSpec:subSpec in:self.
-    ] ifFalse:[
-        savedView := builder window.
-        builder window:self.
-        [
-            anApplication buildSubCanvas:subSpec withBuilder:builder.
-        ] valueNowOrOnUnwindDo:[
-            savedView notNil ifTrue:[
-                builder window:savedView.
-            ]
-        ].
-    ].
+    builder buildFromSpec:subSpec in:self.
+
+"/    postBuildWith: will be called twice if code below is enabled
+"/    notAnAppModel isNil ifTrue:[
+"/        notAnAppModel := (anApplication isKindOf:ApplicationModel) not
+"/    ].
+"/    notAnAppModel ifTrue:[
+"/        builder buildFromSpec:subSpec in:self.
+"/    ] ifFalse:[
+"/        savedView := builder window.
+"/        builder window:self.
+"/        [
+"/            anApplication buildSubCanvas:subSpec withBuilder:builder.
+"/        ] valueNowOrOnUnwindDo:[
+"/            savedView notNil ifTrue:[
+"/                builder window:savedView.
+"/            ]
+"/        ].
+"/    ].
 !
 
 controller
@@ -8759,6 +8767,6 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.376 2000-08-04 12:42:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.377 2000-08-09 08:46:16 ca Exp $'
 ! !
 SimpleView initialize!