This case should now be fixed (fix available in SVN or wait for the next nightly).
Let us know if you continue to see it.
Thanks
Let us know if you continue to see it.
Thanks
public void onModuleLoad() { SC.showConsole(); mainLayout = new VLayout(); Menu menu = new Menu(); menu.setShowShadow(true); menu.setShadowDepth(10); MenuItem subMenu = new MenuItem("SubMenu"); Menu mySubMenu = new Menu(); MenuItem item1 = new MenuItem("Item 1"); item1.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() { @Override public void onClick(MenuItemClickEvent event) { b = !b; } }); MenuItemIfFunction ifFunc = new MenuItemIfFunction() { @Override public boolean execute(Canvas target, Menu menu, MenuItem item) { if (b) return true; return false; } }; item1.setCheckIfCondition(ifFunc); mySubMenu.addItem(item1); subMenu.setSubmenu(mySubMenu); menu.addItem(subMenu); MenuButton mb = new MenuButton("Menu", menu); mainLayout.addMember(mb); mainLayout.draw(); }
final MenuItem zoomPresetMI = new MenuItem("menu"); zoomPresetMI.setChecked(true); zoomPresetMI.addClickHandler(new ClickHandler() { public void onClick(MenuItemClickEvent event) { this.toggleZoomPresetToolstrip(); } }); zoomPresetMI.setCheckIfCondition(new MenuItemIfFunction() { public boolean execute(Canvas target, Menu menu, MenuItem item) { return false; // breakpoint here, never reached } }); toolsMenu.addItem(zoomPresetMI); toolsB.setMenu(toolsMenu);
Comment