Notte fonda e mi chiedevo perchè indexOff mi da sempre -1 ?
B4X:
Public Sub mMenu_add(mMenuBar As MenuBar,menu As MenuItem)
If mMenuBar.Menus.IndexOf("Resume") = -1 Then
Dim mMenu As Menu
mMenu.Initialize("Resume","")
mMenuBar.Menus.Add(mMenu)
mMenu.MenuItems.Add(menu)
Else
Dim mMenu As Menu = mMenuBar.Menus.Get(mMenuBar.Menus.IndexOf("Resume"))
mMenu.MenuItems.Add(menu)
End If
End Sub