Wish XML for Menu Creation

LWGShane

Well-Known Member
Licensed User
Longtime User
@Erel - I would love it if you also added the ability to use valid XML to create menus.

Something like this:
B4X:
<Menu Text="File">
    <MenuItem Text="Quit"></MenuItem>
</Menu>

<Menu Text="Tools">
    <MenuItem Text="Tool 1" tag="Menu Item with tag!"></MenuItem>
    <MenuItem CheckBox="Checkbox Text" Selected="True"></MenuItem>
    <MenuItem Text="Hello World!" EventName="HelloWorld"></MenuItem>
</Menu>

<Menu Text="Empty Menu">Null</Menu>
Null would indicate an empty menu.

(Also, the word valid is bold because the JSON used to create menus isn't valid JSON )
 

LWGShane

Well-Known Member
Licensed User
Longtime User
@Erel - When putting the JSON from the Menu Items tutorial through a JSON validator, it spits out this mass of errors:

B4X:
Error:Strings should be wrapped in double quotes.[Code 17, Structure 3]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 7]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 15]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 19]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 35]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 39]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 46]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 50]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 54]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 58]
Error:Invalid number.[Code 141, Structure 60]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 64]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 68]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 72]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 78]
Error:Strings should be wrapped in double quotes.[Code 17, Structure 82]
 

LWGShane

Well-Known Member
Licensed User
Longtime User
Cookies are required to use this site. You must accept them to continue using the site. Learn more…