MenuPanel.st
changeset 5797 a8f634337522
parent 5795 26cb086b7d66
child 5798 8450c2d91861
--- a/MenuPanel.st	Sun Jun 10 18:36:41 2018 +0200
+++ b/MenuPanel.st	Mon Jun 11 09:58:41 2018 +0200
@@ -3983,15 +3983,20 @@
     self invalidateItem:item repairNow:true.
     self acceptItem:item inMenu:self.
 
-    [ (device notNil and:[device anyButtonPressed]) ] whileTrue:[
-        "/ using device - sensor is not updated sometimes
-        Delay waitForSeconds:0.1.
+    "/ cg: what was this wait for???
+    false ifTrue:[
+        [ (device notNil and:[device anyButtonPressed]) ] whileTrue:[
+            "/ using device - sensor is not updated sometimes
+            Delay waitForSeconds:0.1.
+        ].
     ].
     self sensor flushUserEvents.
     self selection:nil.
 
     "Created: / 13-11-2001 / 14:12:04 / cg"
     "Modified: / 20-11-2016 / 13:20:04 / cg"
+    "Modified: / 11-06-2018 / 08:54:47 / Claus Gittinger"
+    "Modified (comment): / 11-06-2018 / 09:58:04 / Claus Gittinger"
 !
 
 handleCursorKey:aKey
@@ -4582,7 +4587,8 @@
 
 helpTextAt:aPoint
     "return the helpText for aPoint (i.e. when mouse-pointer is moved over an item).
-     If there is a selection, that items helpText is used (ignoring the given point)."
+     If there is a selection, that item's helpText is used (ignoring the given point).
+     cg: this is wrong - should (and does) always show the helptext under the pointer"
 
     |scrollerDirectionOrNil|
 
@@ -4596,16 +4602,22 @@
     ^ nil
 
     "Modified: / 26-10-2017 / 21:46:16 / mawalch"
+    "Modified (comment): / 11-06-2018 / 08:10:29 / Claus Gittinger"
 !
 
 helpTextForItem:anItem
-    "returns the helpText for an item (empty if none)"
+    "returns the helpText for an item (nil if none)"
 
     anItem isNil ifTrue:[^ nil].
     ^ anItem activeHelpText.
+
+    "Modified (comment): / 11-06-2018 / 08:11:08 / Claus Gittinger"
 !
 
 helpTextForKey:aKey
+    "first try my application to provide the text,
+     then, in case I have a pluggable helpSpec, try that"
+     
     |app text spec|
 
     app := self application.
@@ -4613,9 +4625,15 @@
         text := app helpTextForKey:aKey.
         text notNil ifTrue:[^ text].
     ].
-    spec := self helpSpec.
-    spec isNil ifTrue:[^ nil].
-    ^ spec at:aKey ifAbsent:nil
+    pluggableHelpSpecProvider notNil ifTrue:[
+        spec := self helpSpec.
+        spec notNil ifTrue:[
+            ^ spec at:aKey ifAbsent:nil
+        ]
+    ].    
+    ^ nil
+
+    "Modified: / 11-06-2018 / 08:14:16 / Claus Gittinger"
 !
 
 withMenuAndItemAt:srcPoint do:aBlock