--- a/MenuPanel.st Tue Jan 30 20:04:41 2018 +0100
+++ b/MenuPanel.st Wed Jan 31 00:06:12 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1997 by eXept Software AG
All Rights Reserved
@@ -7066,19 +7068,38 @@
activeHelpText
"get the active helpText or nil if not yet resolved"
- |app key|
+ |app key tryItemValue text|
"/ explicitly assigned (probably dynamic)
activeHelpText notNil ifTrue:[^ activeHelpText].
+ tryItemValue := false.
+
"/ activeHelpKey, or - if unassigned - the nameKey as fallback
(key := self activeHelpKey) isNil ifTrue:[
- key := self nameKey
+ key := self nameKey.
+ key notNil ifTrue:[
+ tryItemValue := true.
+ ] ifFalse:[
+ self itemValue isSymbol ifTrue:[
+ key := self itemValue
+ ].
+ ].
].
(key notNil and:[(app := menuPanel application) notNil]) ifTrue:[
- ^ app helpTextForKey:key.
- ].
- ^ nil
+ text := app helpTextForKey:key.
+ text isNil ifTrue:[
+ tryItemValue ifTrue:[
+ self itemValue isSymbol ifTrue:[
+ text := app helpTextForKey:self itemValue.
+ ].
+ ].
+ ].
+ ].
+ text isNil ifTrue:[
+ ^ self rawLabel
+ ].
+ ^ text
!
activeHelpText:aText