I'm having some trouble modifying SideMenu commands since the last JavaSE update.
Test case below shows the problem. Expected result is: clicking on the command will remove it. Actual result is: clicking in the command doesn't seem to do anything.
Toolbar.setGlobalToolbar(true);
Form hi = new Form("Entrada");
Style s = UIManager.getInstance().getComponentStyle("TitleCommand");
FontImage icon = FontImage.createMaterial(FontImage.MATERIAL_WARNING, s);
Command cmd = hi.getToolbar().addCommandToRightBar("Bla", null, (e) -> Log.p("Bla"));
hi.getToolbar().addCommandToSideMenu("Remove", null, (e) -> {
hi.removeCommand(cmd);
hi.revalidate();
});
Also, after adding commands to the sidebar, hi.getCommandCount() returns 0.
Is this a deliberate change? Is there a better way of making "dynamic" SideMenu's? (being able to remove certain commands and put new ones).