Pass menu item as second parameter to menu-item action message jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 16 Mar 2018 10:22:38 +0000
branchjv
changeset 5725 0c98cee2a952
parent 5724 ba5f99908093
child 5814 70d07365a2d4
Pass menu item as second parameter to menu-item action message ..., *not* the top-level menu. One can always access the top-level menu from the menu item. Besides, the UI Builder help says it's the menu item, not the menu.
MenuPanel.st
--- a/MenuPanel.st	Wed Mar 14 11:24:56 2018 +0000
+++ b/MenuPanel.st	Fri Mar 16 10:22:38 2018 +0000
@@ -1164,7 +1164,7 @@
             selectorOrBlock := selectorOrBlock first.
         ] ifFalse:[
 
-            arg2 := self.
+            arg2 := anItem.
 
             "/ support for ST80 style applications
             "/ (expecting the message to go to the application
@@ -1219,7 +1219,7 @@
     ^ self "/ ^ selectorOrBlock
 
     "Modified: / 06-03-2012 / 14:49:00 / cg"
-    "Modified: / 05-02-2018 / 12:30:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-03-2018 / 10:18:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 acceptItem:anItemOrNil inMenu:aMenu