We are using PB 5.73. Maybe it's fixed in the beta?
Here's what happens: Make a window and add a menubar. Make some menu items, then make two items that contain sub menus. Make a few sub menu items for each of them. Make sure those two sub menu "branches" are right next to each other in the menu. Now generate the code and run the window. You will see that PB messed up the menus and put all the items from the second menu inside the first.
The bug becomes clear when looking at the generated code. It places the CloseSubMenu() (s) at the bottom of the menu creation code instead of between every sub menu. I have to forcefully modify the code, but each time the window changes, it goes back to the bugged way.
Example:
Here's the incorrect generated PB code:
Code: Select all
CreateMenu(0, WindowID(Window_Main))
MenuTitle("Test")
MenuItem(#MenuItem_2, "Test 2")
OpenSubMenu("Test 3")
MenuItem(#MenuItem_4, "Sub Item")
MenuItem(#MenuItem_5, "Sub Item 2")
OpenSubMenu("Test 4")
MenuItem(#MenuItem_7, "Another Sub")
MenuItem(#MenuItem_8, "Another Sub 2")
MenuBar()
CloseSubMenu() ; <--- WRONG LOCATION
MenuItem(#MenuItem_Exit, "Exit")
CloseSubMenu() ; <----------
Code: Select all
CreateMenu(0, WindowID(Window_Main))
MenuTitle("Test")
MenuItem(#MenuItem_2, "Test 2")
OpenSubMenu("Test 3")
MenuItem(#MenuItem_4, "Sub Item")
MenuItem(#MenuItem_5, "Sub Item 2")
CloseSubMenu() ; <--- CORRECT
OpenSubMenu("Test 4")
MenuItem(#MenuItem_7, "Another Sub")
MenuItem(#MenuItem_8, "Another Sub 2")
CloseSubMenu() ; <----------
MenuBar()
MenuItem(#MenuItem_Exit, "Exit")