#FEATURE by cg
class: UIHelpTool
added: #alternativeSpecSelectors
changed: #loadFromClass:
check if there is no helpSpec method,
but instead a flyByHelp.
Then load/save into from/that spec method.
--- 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:[