UIHelpTool.st
changeset 3362 177a52729a22
parent 3334 d01f4574870a
child 3392 ade42ddd74fe
--- a/UIHelpTool.st	Mon Dec 12 23:28:30 2016 +0100
+++ b/UIHelpTool.st	Wed Dec 21 20:23:26 2016 +0100
@@ -518,6 +518,12 @@
 
 !UIHelpTool methodsFor:'accessing'!
 
+alternativeSpecSelectors
+    "returns a set of alternative spec method selectors of the resource spec"
+
+    ^ #( flyByHelpSpec tooltipSpec )
+!
+
 helpKey
     "returns the helpKey (symbol) or nil
     "
@@ -712,7 +718,7 @@
     "reads the help dictionary from aClass and find remaining classes 
      'between' aClass and ApplicationModel
     " 
-    |lastContents root list helpSpecSelector|
+    |lastContents root list helpSpecSelector alternativeSelector|
 
     (specClass notNil and:[specClass == aClass]) ifTrue:[
         ^ self.
@@ -721,6 +727,16 @@
     helpSpecSelector := self specSelector.
     specClass := self getHelpSpecClassFromClass:aClass.
 
+    aClass notNil ifTrue:[
+        (aClass theMetaclass implements:helpSpecSelector) ifFalse:[
+            alternativeSelector := (self alternativeSpecSelectors ? #()) detect:[:sel | aClass theMetaclass implements:sel] ifNone:nil.
+            alternativeSelector notNil ifTrue:[
+                helpSpecSelector := specSelector := alternativeSelector.
+                specClass := aClass.
+            ].
+        ].
+    ].
+    
     list := OrderedCollection new.
 
     (specClass isClass and:[specClass isLoaded]) ifTrue:[