The task of creating menu for b4j is not simple because you have to create a jason string.
I made a tool for creating the string based on this thread https://www.b4x.com/android/forum/threads/designer-menu-items.56602/
While doing that I exercised the new designer
For first level menu items only name, tag and event are relevant (I tried to disable but it does not work)
Make sure that an item is selected before doing update or remove.
After "create" you have the string in the clipboard, just paste it to the menu field in the application designer, or copy from the textarea or the log.
Please check and report any problems, it has not been tested too much.
Edit: Ver. 1.1 , logic of update and remove is changed completely.
Edit: Ver 2.0 includes save and load functions. A bug is corrected in submenu operation, now when you click it you can add a sub menu for the selected treeitem.
Edit: ver 2.1 correct a bug.
Edit: ver 2.2 corrected a bug in update.
Edit: ver 2.3 added menu with shortcuts (created by itself ! ) for load(open) and save files.
Edit: ver 2.4 corrects bugs in move and remove.
MenuDesigner_kvs uses KeyValueStore to keep the current "menu in work" ready even while exiting.
Edit: ver 2.5 and kvs_2.5 replace the previous after correction of bug.
Edit: ver 2.6 corrected the same problem in moving nodes.
Note: From version 2.0 the item's details are kept in a map by the item's name as the key. This means that an update cannot include change of the name. To do such update remove the item and add a new item instead.
I made a tool for creating the string based on this thread https://www.b4x.com/android/forum/threads/designer-menu-items.56602/
While doing that I exercised the new designer
For first level menu items only name, tag and event are relevant (I tried to disable but it does not work)
Make sure that an item is selected before doing update or remove.
After "create" you have the string in the clipboard, just paste it to the menu field in the application designer, or copy from the textarea or the log.
Please check and report any problems, it has not been tested too much.
Edit: Ver. 1.1 , logic of update and remove is changed completely.
Edit: Ver 2.0 includes save and load functions. A bug is corrected in submenu operation, now when you click it you can add a sub menu for the selected treeitem.
Edit: ver 2.1 correct a bug.
Edit: ver 2.2 corrected a bug in update.
Edit: ver 2.3 added menu with shortcuts (created by itself ! ) for load(open) and save files.
Edit: ver 2.4 corrects bugs in move and remove.
MenuDesigner_kvs uses KeyValueStore to keep the current "menu in work" ready even while exiting.
Edit: ver 2.5 and kvs_2.5 replace the previous after correction of bug.
Edit: ver 2.6 corrected the same problem in moving nodes.
Note: From version 2.0 the item's details are kept in a map by the item's name as the key. This means that an update cannot include change of the name. To do such update remove the item and add a new item instead.
Attachments
Last edited: