=== modified file 'rules/annotations/menu_scoping.rules'
--- rules/annotations/menu_scoping.rules	2018-12-20 18:16:17 +0000
+++ rules/annotations/menu_scoping.rules	2020-03-18 19:29:43 +0000
@@ -119,10 +119,10 @@
          <return    name="cur"   type="java.lang.String" />
           
          <rule>true
-            <action>parnt = sm_menus.get(sm)</action>
+            <action>parnt = sm_menus.get(sm.toLowerCase())</action>
             <action>cur = parnt</action>
             <while>parnt != null and sm_menus.containsKey(parnt)
-               <!--<action>printfln("parnt: %s, sm_menus.get(parnt): %s", parnt, sm_menus.get(parnt))</action>-->
+               <action>printfln("parnt: %s, sm_menus.get(parnt): %s", parnt, sm_menus.get(parnt))</action>
                <action>cur = sprintf("%s.%s", sm_menus.get(parnt), parnt)</action>
                <action>parnt = sm_menus.get(parnt)</action>
             </while>
@@ -135,7 +135,7 @@
          <return    name="res"   type="java.lang.Boolean" />
 
          <rule>true
-            <action>sm = names.convert(smRef.text, names.variable)</action>
+            <action>sm = names.convert(smRef.text.toLowerCase(), names.variable)</action>
             <action>res = sm_menus.containsKey(sm)</action>
          </rule>
       </function>
@@ -157,7 +157,7 @@
    <!-- main processing (once per tree) -->
    <walk-rules>
       <rule>type == prog.define_menu
-         <action>menu_defs.put(getNoteString("name").toLowerCase(), this.id)</action>
+         <action>menu_defs.put(#(java.lang.String) getNoteString("name").toLowerCase(), this.id)</action>
       </rule>
       <rule>type == prog.wid_menu and menu_defs.containsKey(this.text.toLowerCase())
          <action>putNote("refid", #(long) menu_defs.get(this.text.toLowerCase()))</action>
@@ -169,7 +169,7 @@
       <rule>type == prog.wid_sub_menu and
             parent.type == prog.kw_sub_menu 
            
-         <action>submenu = names.convert(text, names.variable)</action>
+         <action>submenu = names.convert(text.toLowerCase(), names.variable)</action>
  
          <rule>parent.parent != null and
                (parent.parent.type == prog.define_menu or
@@ -177,7 +177,7 @@
                !sm_menus.containsKey(submenu) 
             <action>menu = parent.parent.getAnnotation("name")</action>
             <action>menu = names.convert(menu, names.variable)</action>
-            <!--<action>printfln("adding %s to %s", submenu, menu)</action>-->
+            <action>printfln("adding %s to %s", submenu, menu)</action>
             <action>sm_menus.put(submenu, menu)</action>
          </rule>
 
@@ -224,16 +224,16 @@
       -->
       <rule>type == prog.kw_menu_itm and parent.type == prog.define_menu
          <action>item = names.convert(#(java.lang.String) this.getAnnotation("name"), names.variable)</action>
-         <action>items.put(item, parent)</action>
+         <action>items.put(item.toLowerCase(), parent)</action>
       </rule>
 
       <rule>type == prog.kw_menu_itm and parent.type == prog.define_sub_menu
          <action>item = names.convert(#(java.lang.String) this.getAnnotation("name"), names.variable)</action>
-         <rule>!items.containsKey(item)
-            <action>list = items_subs.get(item)</action>
+         <rule>!items.containsKey(item.toLowerCase())
+            <action>list = items_subs.get(item.toLowerCase())</action>
             <rule>list == null
                <action>list = #(java.util.List) create("java.util.ArrayList")</action>
-               <action>items_subs.put(item, list)</action>
+               <action>items_subs.put(item.toLowerCase(), list)</action>
             </rule>
             <action>list.add(parent)</action>
          </rule>
@@ -264,7 +264,7 @@
                   <action on="false">symToken = ref.getSymbolicTokenType()</action>
                </rule>
                <action>
-                  putNote(sprintf("IN_%s", symToken), names.convert(ref.text, names.variable))
+                  putNote(sprintf("IN_%s", symToken), names.convert(ref.text.toLowerCase(), names.variable))
                </action>
                <action>
                   putNote(sprintf("IN_%s_ID", symToken), ref.id)
@@ -272,7 +272,7 @@
             </rule>
 
             <rule>ref == null
-               <action>ref = items.get(names.convert(text, names.variable))</action>
+               <action>ref = items.get(names.convert(text.toLowerCase(), names.variable))</action>
             </rule>
 
             <rule>ref != null
@@ -308,7 +308,7 @@
               #(java.lang.Boolean) execLib("is_submenu", this))) and
              parent.parent.type != prog.define_menu and
              parent.parent.type != prog.define_sub_menu
-         <action>menu = execLib("find_sm_menu", names.convert(text, names.variable))</action>
+         <action>menu = execLib("find_sm_menu", names.convert(text.toLowerCase(), names.variable))</action>
          <rule>menu != null
             <action>putNote("first-menu-path", menu)</action>
             <action>putNote("in_wid_menu", menu)</action>

=== modified file 'rules/convert/methods_attributes.rules'
--- rules/convert/methods_attributes.rules	2020-03-17 02:40:10 +0000
+++ rules/convert/methods_attributes.rules	2020-03-18 18:59:30 +0000
@@ -4939,6 +4939,7 @@
                     implementation -->
                <rule>ftype == prog.kw_handle and 
                           (evalLib("widgettype", ref.type) or
+                           ref.type == prog.kw_menu_itm    or
                            ref.type == prog.kw_sub_menu    or
                            ref.type == prog.kw_menu)
                   <action>hwrap = "Widget"</action>

=== modified file 'rules/convert/widget_references.rules'
--- rules/convert/widget_references.rules	2019-07-16 10:15:56 +0000
+++ rules/convert/widget_references.rules	2020-03-18 18:11:34 +0000
@@ -307,7 +307,7 @@
                <action>
                   lastid = tw.graft("double_method_call", null, closestPeerId,
                                     "methodtxt1", methodName,
-                                    "javaname1", names.convert(text, names.variable),
+                                    "javaname1", names.convert(text.toLowerCase(), names.variable),
                                     "methodtxt2", "getSelf",
                                     "javaname2", menu,
                                     "memberOrReference", "REFERENCE").getId()
@@ -321,7 +321,7 @@
                <action>
                   lastid = tw.graft("double_method_call", null, closestPeerId,
                                     "methodtxt1", methodName,
-                                    "javaname1", names.convert(text, names.variable),
+                                    "javaname1", names.convert(text.toLowerCase(), names.variable),
                                     "methodtxt2", "getSelf",
                                     "javaname2", menu,
                                     "memberOrReference", "MEMBER").getId()

