Hi Randy,

I gather you are adding one or more dynamic menus to the menu bar created in 
the Menu Editor. In that case, you need to work with references, not a 
positional integer.

The positional index works only for menus created in the Menu Editor.

Try this, which assumes no hierarchical menus:

--
$mb_ref_t:=Get menu bar reference

ARRAY TEXT($mb_menu_title_at;0)
ARRAY TEXT($mb_menu_ref_at;0)

GET MENU ITEMS($mb_ref_t;$mb_menu_title_at;$mb_menu_ref_at)

For ($menu_i;1;Size of array($mb_menu_title_at))
        
        $menu_title_t:=$mb_menu_title_at{$menu_i}
        $menu_ref_t:=$mb_menu_ref_at{$menu_i}
        
        ARRAY TEXT($menu_item_text_at;0)
        ARRAY TEXT($menu_ref_at;0)
        
        GET MENU ITEMS($menu_ref_t;$menu_item_text_at;$menu_ref_at)
        
        For ($menu_item_i;1;Size of array($menu_item_text_at))
                
                $menu_item_ref_t:=$menu_item_text_at{$menu_item_i}
                
                // get specifics using positional $menu_item_i OR reference 
$menu_item_ref_t
                
        End for
End for

- Jeremy French


> On Sep 26, 2017, at 11:52 AM, Two Way Communications via 4D_Tech 
> <[email protected]> wrote:
> 
> Although you can get a list of menus in the menu bar (GET MENU ITEMS), this 
> doesn’t work when you pass the menu ref for one of the menus. 

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to