--- a/ApplicationModel.st Tue Jan 09 17:33:30 2018 +0100
+++ b/ApplicationModel.st Tue Jan 09 17:36:51 2018 +0100
@@ -2641,6 +2641,14 @@
"Modified: / 31.7.1998 / 23:03:10 / cg"
!
+flyByHelpTextFor:aComponent at:aPoint
+ "if not redefined by subclass, fall back to general method"
+
+ ^ self flyByHelpTextFor:aComponent
+
+ "Created: / 09-01-2018 / 16:32:40 / stefan"
+!
+
flyByHelpTextForKey:aKey
"flyByHelp interface: return some short help text for a key
key is the symbol associated with some widget or menu item.
@@ -2652,33 +2660,34 @@
helpText := self basicFlyByHelpTextForKey:aKey.
helpText isNil ifTrue:[
- masterApplication notNil ifTrue:[
- "here we get an already translated helpText"
- helpText := masterApplication flyByHelpTextForKey:aKey.
- ].
- helpText isNil ifTrue:[
- "there is no help text - resolve key from resources"
- helpText := (self translateString:aKey) withCRs.
- ].
- ^ helpText.
+ masterApplication notNil ifTrue:[
+ "here we get an already translated helpText"
+ helpText := masterApplication flyByHelpTextForKey:aKey.
+ ].
+ helpText isNil ifTrue:[
+ "there is no help text - resolve key from resources"
+ helpText := (self translateString:aKey) withCRs.
+ ].
+ ^ helpText.
].
"/ kludge to allow for dynamic translation by the application itself, avoiding the key translation below.
helpText isBlock ifTrue:[
- ^ helpText value.
+ ^ helpText value.
].
"get the translation"
translatedHelpText := self translateString:helpText.
(helpText = aKey and:[ translatedHelpText = helpText ]) ifTrue:[
- "there is no translation in the resources - maybe there is one for the key?"
- translatedKey := self translateString:aKey.
- translatedKey ~~ aKey ifTrue:[
- translatedHelpText := translatedKey.
- ].
+ "there is no translation in the resources - maybe there is one for the key?"
+ translatedKey := self translateString:aKey.
+ translatedKey ~~ aKey ifTrue:[
+ translatedHelpText := translatedKey.
+ ].
].
^ translatedHelpText withCRs.
"Modified: / 27-01-2012 / 14:33:54 / cg"
+ "Modified (comment): / 09-01-2018 / 17:36:30 / stefan"
!
flyByHelpTextForKey:aKey row:aRowNr