comment
authorClaus Gittinger <cg@exept.de>
Tue, 20 Jul 1999 13:04:02 +0200
changeset 1208 c9904a2499ea
parent 1207 5ca42a599a49
child 1209 7ed72799d0ee
comment
WinBuilder.st
WindowBuilder.st
--- a/WinBuilder.st	Tue Jul 20 13:00:50 1999 +0200
+++ b/WinBuilder.st	Tue Jul 20 13:04:02 1999 +0200
@@ -297,8 +297,38 @@
 componentAt:name
     "return a component identified by its name.
     "
-    namedComponents isNil ifTrue:[^ nil].
-    ^ namedComponents at:name asSymbol ifAbsent:nil
+
+    |widget appBuilder masterApplication masterBuilder|
+
+    namedComponents notNil ifTrue:[
+        widget := namedComponents at:name asSymbol ifAbsent:nil.
+        widget notNil ifTrue:[^ widget].
+    ].
+
+    "/ cg the following code looks in any application-
+    "/ or master applications builder for the component.
+    "/ This as an effect, if a subcanvases builder is asked for
+    "/ a component, which is actually held by the real-apps builder
+    "/ (in case they have different builders).
+    "/ For now, this code is disabled, since I dont know what effect this
+    "/ has to existing code ...
+
+"/    application notNil ifTrue:[
+"/        (appBuilder := application builder) notNil ifTrue:[
+"/            appBuilder ~~ self ifTrue:[    
+"/                ^ appBuilder componentAt:name
+"/            ]
+"/        ].
+"/
+"/        (masterApplication := application masterApplication) notNil ifTrue:[
+"/            (masterBuilder := masterApplication builder) notNil ifTrue:[
+"/                masterBuilder ~~ self ifTrue:[    
+"/                    ^ masterBuilder componentAt:name
+"/                ]
+"/            ]
+"/        ]
+"/    ].
+    ^ nil
 !
 
 componentAt:name put:aComponent
@@ -1205,5 +1235,5 @@
 !WindowBuilder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Attic/WinBuilder.st,v 1.78 1999-07-09 19:22:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Attic/WinBuilder.st,v 1.79 1999-07-20 11:04:02 cg Exp $'
 ! !
--- a/WindowBuilder.st	Tue Jul 20 13:00:50 1999 +0200
+++ b/WindowBuilder.st	Tue Jul 20 13:04:02 1999 +0200
@@ -297,8 +297,38 @@
 componentAt:name
     "return a component identified by its name.
     "
-    namedComponents isNil ifTrue:[^ nil].
-    ^ namedComponents at:name asSymbol ifAbsent:nil
+
+    |widget appBuilder masterApplication masterBuilder|
+
+    namedComponents notNil ifTrue:[
+        widget := namedComponents at:name asSymbol ifAbsent:nil.
+        widget notNil ifTrue:[^ widget].
+    ].
+
+    "/ cg the following code looks in any application-
+    "/ or master applications builder for the component.
+    "/ This as an effect, if a subcanvases builder is asked for
+    "/ a component, which is actually held by the real-apps builder
+    "/ (in case they have different builders).
+    "/ For now, this code is disabled, since I dont know what effect this
+    "/ has to existing code ...
+
+"/    application notNil ifTrue:[
+"/        (appBuilder := application builder) notNil ifTrue:[
+"/            appBuilder ~~ self ifTrue:[    
+"/                ^ appBuilder componentAt:name
+"/            ]
+"/        ].
+"/
+"/        (masterApplication := application masterApplication) notNil ifTrue:[
+"/            (masterBuilder := masterApplication builder) notNil ifTrue:[
+"/                masterBuilder ~~ self ifTrue:[    
+"/                    ^ masterBuilder componentAt:name
+"/                ]
+"/            ]
+"/        ]
+"/    ].
+    ^ nil
 !
 
 componentAt:name put:aComponent
@@ -1205,5 +1235,5 @@
 !WindowBuilder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.78 1999-07-09 19:22:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.79 1999-07-20 11:04:02 cg Exp $'
 ! !