No, i have issues debugging with this framework, however you can test the concept in a simple menu like copying the one from the sampler and get same result. It should work, but it doesn’t, reason unknown. One solution is having one command for each menu item, otherwise i can’t spend time on it if i can’t properly debug.
return menubar;
}
private Command menuCommand = new Command() {
public void menuSelected(MenuItem selectedItem) {
if (selectedItem == folder)
menubar.getWindow().showNotification("Folder");
if (selectedItem == project)
menubar.getWindow().showNotification("Project");
}
};
[/code] works like a charm.
Also to debug you just need to make sure you have a debug connection to the server (unless you are running it in debug mode from your IDE, then you will have it automatically). Then just set the breakpoint at “if (selectedItem == folder)” for instance and you can check that the variables are indeed the same.