checkin from browser
authorClaus Gittinger <cg@exept.de>
Fri, 21 Feb 2003 11:25:12 +0100
changeset 1681 7a8e5df3f07d
parent 1680 be9c3f67a19b
child 1682 f1b2491c9dc2
checkin from browser
UIHelpTool.st
--- a/UIHelpTool.st	Fri Feb 21 11:24:49 2003 +0100
+++ b/UIHelpTool.st	Fri Feb 21 11:25:12 2003 +0100
@@ -28,7 +28,7 @@
 !
 
 HierarchicalItem subclass:#KeyItem
-	instanceVariableNames:'helpKey helpText modified icon'
+	instanceVariableNames:'helpKey helpText flyByText modified icon'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:UIHelpTool
@@ -575,9 +575,9 @@
 !
 
 specSelector
-    "returns the selector on which the class is opened
+    "returns the selector of the edited helpSpec method
     "
-    ^ specSelector
+    ^ specSelector ? #helpSpec
 ! !
 
 !UIHelpTool methodsFor:'aspects'!
@@ -697,16 +697,16 @@
     "reads the help dictionary from aClass and find remaining classes 
      'between' aClass and ApplicationModel
     " 
-    |lastContents root list resource|
+    |lastContents root list resource helpSpecSelector|
 
-    specSelector isNil ifTrue:[ specSelector := #helpSpec ].
+    helpSpecSelector := self specSelector.
     specClass := self getHelpSpecClassFromClass:aClass.
 
     list := OrderedCollection new.
 
     (specClass isClass and:[specClass isLoaded]) ifTrue:[
         lastContents := nil.
-        resource := specClass name, ' ', specSelector.
+        resource := specClass name, ' ', helpSpecSelector.
         self addToHistory:(Association key:resource value:#'loadFromMessage:').
 
         specClass withAllSuperclasses reverse do:[:aClass| |value name|
@@ -717,8 +717,8 @@
             ] ifFalse:[
                 root := ClassItem onClass:aClass.
 
-                (aClass class includesSelector:specSelector) ifTrue:[
-                    value := aClass perform:specSelector.
+                (aClass class includesSelector:helpSpecSelector) ifTrue:[
+                    value := aClass perform:helpSpecSelector.
 
                     value keysAndValuesDo:[:k :v| |cval|
                         cval := lastContents at:k ifAbsent:self.
@@ -1123,12 +1123,12 @@
     "opens a Resource Selection Browser in order to get a resource message
     "
     self loadFromMessage: 
-	(ResourceSelectionBrowser
-	    request: 'Load Help Spec From Class'
-	    onSuperclass: nil
-	    andClass: specClass
-	    andSelector: specSelector ? #help
-	    withResourceTypes: (Array with: #help)).
+        (ResourceSelectionBrowser
+            request: 'Load Help Spec From Class'
+            onSuperclass: nil
+            andClass: specClass
+            andSelector: (self specSelector)
+            withResourceTypes: (Array with: #help)).
 
     self updateInfoLabel
 !
@@ -1153,7 +1153,9 @@
         ^ nil
     ].
 
-    classItemList do:[:aClassItem| aClassItem createHelpMethodNamed:specSelector ].
+    classItemList do:[:aClassItem| 
+        aClassItem createHelpMethodNamed:(self specSelector) 
+    ].
 !
 
 openDocumentation
@@ -1359,7 +1361,7 @@
 
 !UIHelpTool::KeyItem class methodsFor:'instance creation'!
 
-helpKey:aKey helpText:aText
+helpKey:aKey helpText:aText 
     |key|
 
     key := self new.
@@ -1382,7 +1384,7 @@
 !
 
 helpText:aText
-    "set the contents assigned to the helpKey; if the cxontents changed,
+    "set the contents assigned to the helpKey; if the contents changes,
      a notification is raised.
     "
     |text|
@@ -1390,11 +1392,11 @@
     text := self formatText:aText.
 
     text ~= helpText ifTrue:[
-	helpText := text.
+        helpText := text.
 
-	(modified or:[parent isNil]) ifFalse:[
-	    parent helpTextChangedFor:self.
-	]
+        (modified or:[parent isNil]) ifFalse:[
+            parent helpTextChangedFor:self.
+        ]
     ].
 ! !