Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug with dialogs

    In the build 5.1p power 13.09.15 I get a new bug (see screenshot). This was working with previous versions.

    Code:
    public class TestingModule implements EntryPoint {
    
        @Override
        public void onModuleLoad() {
    
            IButton button = new IButton("click me");
            button.addClickHandler(new ClickHandler() {
    
                @Override
                public void onClick(ClickEvent event) {
                    ask("this is a question", new BooleanCallback() {
    
                        @Override
                        public void execute(Boolean value) {
                            SC.say(value + "");
                        }
                    });
                }
            });
            button.draw();
    
        }
    
        public static void ask(String message, final BooleanCallback callback) {
            final Dialog dialog = new Dialog();
            dialog.setTitle("title");
            dialog.setMessage(message);
            dialog.setIsModal(true);
            dialog.setShowModalMask(true);
    
            dialog.addCloseClickHandler(new CloseClickHandler() {
    
                @Override
                public void onCloseClick(CloseClickEvent event) {
                    KidsDialogs.hideLoadingMask();
                }
            });
    
            Button jaButton = new Button("yes");
            Button neinButton = new Button("no");
    
            jaButton.addClickHandler(new ClickHandler() {
    
                @Override
                public void onClick(ClickEvent event) {
                    if (callback != null) {
                        callback.execute(true);
                    }
                    dialog.markForDestroy();
                }
            });
    
            neinButton.addClickHandler(new ClickHandler() {
    
                @Override
                public void onClick(ClickEvent event) {
                    if (callback != null) {
                        callback.execute(false);
                    }
                    dialog.markForDestroy();
                }
            });
            dialog.setButtons(jaButton, neinButton);
            dialog.show();
        }
    
    }

    #2
    We've made a fix to address the problem you're seeing, which will be applied to all affected branches in the nightly builds marked 2015-09-18.

    Note that a workaround is simply set the width of the affected buttons.

    Comment

    Working...
    X