help
authorca
Mon, 16 Jun 1997 18:54:03 +0200
changeset 151 8768bf518383
parent 150 9f88bc99e0af
child 152 2261aa2fa21d
help
UIHelpTool.st
--- a/UIHelpTool.st	Mon Jun 16 11:39:41 1997 +0200
+++ b/UIHelpTool.st	Mon Jun 16 18:54:03 1997 +0200
@@ -14,6 +14,20 @@
 "
 ! !
 
+!UIHelpTool class methodsFor:'help specs'!
+
+helpSpec
+    "return a dictionary filled with helpKey -> helptext associations.
+     These are used by the activeHelp tool."
+
+    |dict|
+
+    dict := super helpSpec.
+    dict at:#activeHelpAccessKey put:'This ID is used to access an active
+help text for the selected component'.
+    ^ dict
+! !
+
 !UIHelpTool class methodsFor:'interface specs'!
 
 windowSpec
@@ -23,10 +37,10 @@
      handle the specification if its corrupted."
 
     "
-     UIPainter new openOnClass:ActiveHelpTool andSelector:#windowSpec
-     ActiveHelpTool new openInterface:#windowSpec
+     UIPainter new openOnClass:UIHelpTool andSelector:#windowSpec
+     UIHelpTool new openInterface:#windowSpec
     "
-    "ActiveHelpTool open"
+    "UIHelpTool open"
 
     <resource: #canvas>
 
@@ -63,6 +77,7 @@
                  #(#ComboBoxSpec
                     #'name:' 'comboBox'
                     #'layout:' #(#LayoutFrame 46 0 1 0 0 1.0 21 0)
+                    #'activeHelpKey:' #activeHelpAccessKey
                     #'tabable:' true
                     #'comboList:' #listChannel
                 )
@@ -80,6 +95,21 @@
 
 !UIHelpTool methodsFor:'accessing'!
 
+dictionary
+    "return the value of the instance variable 'dictionary' (automatically generated)"
+
+    ^ dictionary!
+
+dictionary:aDictionary
+    "set the value of the instance variable 'dictionary' (automatically generated)"
+
+    (dictionary := aDictionary) notNil ifTrue:[
+        list := dictionary keys asOrderedCollection
+    ] ifFalse:[
+        list := nil
+    ].
+!
+
 key
     "get the key from the edit field as symbol or nil
     "
@@ -106,6 +136,7 @@
         model addDependent:self
     ].
     (builder componentAt:#comboBox) model:model.
+    self update:nil with:#model from:model.
 ! !
 
 !UIHelpTool methodsFor:'actions'!
@@ -145,6 +176,7 @@
 
     (holder := builder bindingAt:#listChannel) isNil ifTrue:[
         builder aspectAt:#listChannel put:(holder :=  ValueHolder new).
+        holder value:list
     ].
     ^ holder
 !