still debugging replaceBy:
authorClaus Gittinger <cg@exept.de>
Mon, 04 Feb 2008 10:29:55 +0100
changeset 2265 f6fbbcdd3764
parent 2264 26ee5a23ae95
child 2266 0234d226a06a
still debugging replaceBy:
UIPainterView.st
--- a/UIPainterView.st	Mon Feb 04 10:29:04 2008 +0100
+++ b/UIPainterView.st	Mon Feb 04 10:29:55 2008 +0100
@@ -533,7 +533,7 @@
 "/    builder := UIBuilder new isEditing:true.
 "/    newView := aNewSpec buildViewWithLayoutFor:builder in:(container contents view).
 self halt.
-^self.
+"/ ^self.
     self deleteSelectionBuffered:false.
     widgets := self pasteSpecifications:(Array with:aNewSpec) keepLayout:false.
     self select:widgets.
@@ -636,6 +636,7 @@
     |prop|
 
     aView isNil ifTrue:[ ^ false ].
+    aView == self ifTrue:[ ^ true ].
 
     (prop := self propertyOfView:aView) notNil ifTrue:[
         ^ prop spec class supportsSubComponents
@@ -1613,10 +1614,12 @@
 
     cls := self targetClass.
     cls notNil ifTrue:[
-        cls methodsDo:[:m |
-            ((m resources ? #()) includesAny:#(uiAspect)) ifTrue:[
-                aspects add:m selector
-            ].                  
+        cls withAllSuperclassesDo:[:cls |
+            cls methodsDo:[:m |
+                ((m resources ? #()) includesAny:#(uiAspect)) ifTrue:[
+                    aspects add:m selector
+                ].                  
+            ]
         ]
     ].
 
@@ -2311,14 +2314,22 @@
         "/ needed if we change a containers layout from fit to non-fit.
 
         (aView subViews ? #()) do:[:aSubView |
-            |fix spec prop|
+            |fix spec prop container|
 
             (prop := self propertyOfView:aSubView) notNil ifTrue:[
                 spec := prop spec.
 
                 spec useDefaultExtent ifTrue:[
                     fix := aSubView sizeFixed:false.
-                    aSubView extent:aSubView preferredExtent.
+                    aView class == VerticalPanelView ifTrue:[
+                        aSubView height:aSubView preferredExtent y.
+                    ] ifFalse:[
+                        aView class == HorizontalPanelView ifTrue:[
+                            aSubView width:aSubView preferredExtent x.
+                        ] ifFalse:[
+                            aSubView extent:aSubView preferredExtent.
+                        ].
+                    ].
                     aSubView sizeFixed:fix
                 ]
             ]