Moved #client: and #client:spec from SubCanvas
authorStefan Vogel <sv@exept.de>
Tue, 21 Sep 1999 20:08:47 +0200
changeset 2919 a6219b65a111
parent 2918 1e777dc8588a
child 2920 4f8e6c266f80
Moved #client: and #client:spec from SubCanvas
SimpleView.st
--- a/SimpleView.st	Tue Sep 21 15:06:18 1999 +0200
+++ b/SimpleView.st	Tue Sep 21 20:08:47 1999 +0200
@@ -3077,6 +3077,46 @@
     self aspectMessage:aspectSymbol
 !
 
+client:anApplicationModel
+    "release existing components and generate new components from
+     the applications windowSpec."
+
+    ^ self client:anApplicationModel spec:#windowSpec
+
+
+!
+
+client:anApplication spec:aWindowSpecOrSelector
+    "release existing components and generate new components from
+     the applications windowSpec."
+
+  ^ self client:anApplication spec:aWindowSpecOrSelector builder:nil
+
+!
+
+client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder
+    "release existing components and generate new components from
+     the given windowSpec, using the given builder."
+
+    |builder subSpec|
+
+    aWindowSpecOrSpecSymbol isNil ifTrue:[^ self].
+
+    (builder := aBuilder) isNil ifTrue:[
+        builder := anApplication perform:#builder
+                         ifNotUnderstood:[UIBuilder new]
+    ].
+
+    (subSpec := aWindowSpecOrSpecSymbol) isSymbol ifTrue:[
+        anApplication isNil ifTrue:[^ self].
+        subSpec := anApplication class interfaceSpecFor:aWindowSpecOrSpecSymbol.
+        subSpec isNil ifTrue:[
+            ^ self
+        ].
+    ].
+    builder buildFromSpec:subSpec in:self.
+!
+
 controller
     "return the controller. For views which implement the controller
      functionality themself, return the receiver itself"
@@ -8292,6 +8332,6 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.339 1999-09-21 12:19:28 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.340 1999-09-21 18:08:47 stefan Exp $'
 ! !
 SimpleView initialize!