Share My Creation Menu Designer

LucaMs

Expert
Licensed User
Longtime User
Hi @derez

First of all, thanks for this useful tool.

I'm trying your Menu Designer 2.4. If I remove an Item the program crashes:

Error occurred on line: 294 (main).
java.lang.RuntimeException: Object should first be initialized (Map).


B4X:
Sub Update_Children_List(t As TreeItem) ' t is the parent item of the item that is changed (deleted or moved)
    Dim L As List
    Dim m As Map
    L.Initialize
    For Each ti As TreeItem In t.Children
        L.Add(ti.Text)
    Next
    m = mainmap.Get(t.Text)
    m.Put("Children",L)    '  <--- Line 294
    mainmap.Put(t.text,m)
End Sub

I added a first Main Menu with one sub menu, a second Main (no sub menues) and a third Main; I tried to remove this third Main menu.


Thank you
 
Last edited:

derez

Expert
Licensed User
Longtime User
Thank you LucaMs for the report. The bug was in trying to update the children list of root in the main map while it is not stored there at all.
The corrected versions were uploaded.
 

Cableguy

Expert
Licensed User
Longtime User

I report this same issue, removing an item crashes the app with the above message, but in line 175 in the "non kvs" version
 

LWGShane

Well-Known Member
Licensed User
Longtime User

Having the same problem, but with moving a menu item.
 

derez

Expert
Licensed User
Longtime User
ColdBlueLava wrote:
Having the same problem, but with moving a menu item.
Can you please tell me the exact menu and which item was moved that caused the crash ?
Cableguy - sorry I missed your post.
I'll check it.
 

LWGShane

Well-Known Member
Licensed User
Longtime User
@derez: It occurs on any menu item. (with or without Sub-Items.)
 

derez

Expert
Licensed User
Longtime User
The same problem that appeared in deletion was corrected in up and down as well.
Uploaded in the first post, ver 2.6
 
Last edited:

LWGShane

Well-Known Member
Licensed User
Longtime User
Bug: Updating Tag on main menu deletes all child menus.
 

derez

Expert
Licensed User
Longtime User
Bug: Updating Tag on main menu deletes all child menus.
I checked and it works fine. Is it possible that you just need to open the node by click on the triangle on the left ?
 

derez

Expert
Licensed User
Longtime User
Upload the text, I'll do it for you
Or, if you have the result you can put it in an application and see the menu, create with the tool a new one just like the one you have and sava it.
 
Last edited:

LWGShane

Well-Known Member
Licensed User
Longtime User
@derez

1: I think it was 'operator error'. I'm unable to reproduce it.

2: The Separator item is just a "-" and not "{Text:"-"}".

B4X:
[
   {Text: "_File", Children:
     ["_New", "_Save",
     {Text: "_Export", Children: ["Zip File", "Tar File"]},
     "-",
     "_Close"]
   }
]
 

Mashiane

Expert
Licensed User
Longtime User

LWGShane

Well-Known Member
Licensed User
Longtime User
Last edited:

LWGShane

Well-Known Member
Licensed User
Longtime User
New update:

- Finalized my GUI modifications.
- Modify Button Text "Create Code" to "Compile Menu".
- Add @Mashiane's code with the button titled "Decompile Menu".
- Added the ability to hit "enter" or "return" to add a menu item to each text field.

(Download Removed. Latest is attached.)

This is the first open source project I've contributed code to.

Hotfix Release 3.0.1:
- Forgot to add the ShortcutText_Action event.

2016 Release 1:
- Fix separator code. By mistake, it was adding the {} to the "-", which resulted in wrong JSON code. (I have no idea why as it wasn't before.)
- Change versioning to YEAR, RELEASE #

ZIP is attached.
 

Attachments

  • MenuDesigner_2016_R1.zip
    57.1 KB · Views: 401
Last edited:

DavideV

Active Member
Licensed User
Longtime User
Hi all contributors
this tool really useful and using it i found that crashes while cancel the open file dialog without choosing a file.
Just added my contribution too fixing it. I saw some other crashes in some cases but i haven't investigated more...
Thanks to Derez for starting this app (and other of course to keep it updated) !
 

Attachments

  • MenuDesigner_2016_R1_1.zip
    22.3 KB · Views: 370

LWGShane

Well-Known Member
Licensed User
Longtime User
I finally figured out why the separator code wasn't working. I also had to copy my separator code to where the the app's code appended the string with a "}".

B4X:
  If t_text.Contains("separator") Or t_text.Contains("Separator") Then
    'If the word is separator or Separator, then don't appened with a "}".
Else
    sb.Append("}")
End If

Menu Designer 2016 Release 2 is now available. It should fix the problem where the app would append the separator symbol with an "}". Project is attached.


@DavideV - This is why I love open source projects: they're powered by the community.
 

Attachments

  • MenuDesigner Release 2.zip
    21.6 KB · Views: 399
Last edited:

TorontoJim

Member
Licensed User
Longtime User
Just downloaded this. It would have stopped me from beating my head on the desk if I'd seen it earlier. Thank you for providing this great tool.
 

Mashiane

Expert
Licensed User
Longtime User
Hi there, I have updated the app for the following:

1. Used splitpane to make the screen bigger, there are three sections to the app, the tree, the buttons and the output, see screen dumps below. You can maximise the screen for full effect.
2. When creating a "New" menu, you are prompted for the project name. This enables one to differentiate between different menus they will create, see the screen dumps below.
3. Each time you Add, Update, Down, Up and item, the current state of the menu is Saved using the projject Name specified in 2. above. This ensures you never loose your menu.
4. Thanks to TorontoJim on post #38, I've added a recent files functionality to the designer. This means selecting your recent file will open that project. Each time you "Open" a project or "Save As", the recent file list is updated automatically.

This uses the JRDialog8 library available here.
 

Attachments

  • mdRecentFiles.png
    13.2 KB · Views: 404
  • mdFileNew.png
    16 KB · Views: 394
  • menuDesigner.png
    29.1 KB · Views: 386
  • jMenuDesigner.zip
    31.3 KB · Views: 403
Cookies are required to use this site. You must accept them to continue using the site. Learn more…