UIPainter.st
changeset 295 114befd1c369
parent 287 1ecabfd468dc
child 297 14db1276218c
--- a/UIPainter.st	Tue Aug 26 17:45:24 1997 +0200
+++ b/UIPainter.st	Tue Aug 26 17:49:17 1997 +0200
@@ -102,8 +102,12 @@
 
 helpSpec
     "return a dictionary filled with helpKey -> helptext associations.
-     These are used by the activeHelp tool.
+     These are used by the activeHelp tool."
+
     "
+    UIHelpTool openOnClass:UIPainter    
+    "
+
   ^ super helpSpec addPairsFrom:#(
 
 #moveSelectionLeft
@@ -115,15 +119,15 @@
 #pasteBuffer
 'paste widgets at current mouse position'
 
+#moveSelectionUp
+'move selected widgets up while pressing the button'
+
 #galleryShown
 'show or hide gallery view'
 
 #moveSelectionDown
 'move selected widgets down while pressing the button'
 
-#moveSelectionUp
-'move selected widgets up while pressing the button'
-
 #spreadSelectionVer
 'vertical spacing between selected widgets is made the same'
 
@@ -1324,7 +1328,7 @@
     ].
 
     cls notNil ifTrue:[
-        (aspect := self specTool specification menu) notNil ifTrue:[
+        (aspect := self specTool specification menuSelector) notNil ifTrue:[
             aspect := aspect asSymbol
         ] ifFalse:[
             "/ cg: q&d hack ...
@@ -1347,7 +1351,7 @@
 
         editor selectorName ~= aspect ifTrue:[
             editor didInstall ifTrue:[
-                self specTool specification menu:editor selectorName asSymbol.
+                self specTool specification menuSelector:editor selectorName asSymbol.
                 self modifiedChannel value:true.
                 self accept
             ]
@@ -1814,7 +1818,7 @@
 treeSelection
     "called whenever the selection of the treeview changed
     "
-    |view list spec property tabComponent|
+    |view list spec slices size property tabComponent|
 
     self isModified ifTrue:[
         (self confirm:'accept change made in ' , tabSelection printString , ' section ?') ifTrue:[
@@ -1841,9 +1845,12 @@
 
     spec notNil ifTrue:[
         self helpTool helpKey:(spec activeHelpKey).
-        list := spec class slices collect:[:aSlice| aSlice first asString].
-        list add:(UIHelpTool   label).
-        list add:(UILayoutTool label).
+        slices := spec class slices.
+        size   := slices size.
+        list   := Array new:(size + 2).
+        1 to:size do:[:i| list at:i put:((slices at:i) first asString)].
+        list at:(size + 1) put:(UIHelpTool   label).
+        list at:(size + 2) put:(UILayoutTool label).
         self tabList value:list.
         self showHelp:(spec class name) for:nil.
         tabComponent enabled:true.
@@ -2555,9 +2562,13 @@
 addProperty:aProperty
     "add a new item
     "
-    model add:(TreeItem name:(aProperty name) contents:aProperty) 
-        below:(self detectItemRespondsToView:(aProperty view superView))
-
+    |parent|
+
+    parent := self detectItemRespondsToView:(aProperty view superView).
+
+    parent notNil ifTrue:[
+        model add:(TreeItem name:(aProperty name) contents:aProperty) below:parent
+    ]
 
 !