Regression in InteractionDialog.showPopup()?

15 views
Skip to first unread message

James Hastings

unread,
Jun 21, 2020, 1:03:29 AM6/21/20
to CodenameOne Discussions
I'm using an InteractionDialog in a couple of apps, and I noticed that now when they are opened (triggered by a button press) they don't contain any of the components I've added to them. The dialog is empty. After much experimenting, I found that if I use show() the dialogs fill as normal. Is there a regression with this component?

Shai Almog

unread,
Jun 21, 2020, 2:18:39 AM6/21/20
to CodenameOne Discussions
I made some changes to that class that might have broken something. Do you have a test case I can use to reproduce this issue?

James Hastings

unread,
Jun 21, 2020, 2:48:30 PM6/21/20
to CodenameOne Discussions
I just built a bare bones project with native theme and added the code below to start() in the main class.

public void start() {
       
if(current != null){
            current
.show();
           
return;
       
}
       
Form hi = new Form("Hi World", BoxLayout.y());
        hi
.add(new Label("Hi World"));
       
Button testButton = new Button("OPEN DIALOG");
        hi
.add(testButton);
        testButton
.addActionListener(l -> {
           
InteractionDialog id = new InteractionDialog(BoxLayout.y());
           
for (int i = 1; i <= 5; i++) {
               
Label text = new Label("Label " + i);
                id
.add(text);
           
}
           
Button disposeButton = new Button("EXIT");
            disposeButton
.addActionListener(l2 -> {
                id
.dispose();
           
});
            id
.add(disposeButton);
            id
.setAnimateShow(true);
            id
.showPopupDialog(testButton); //This does not add components to the InteractionDialog
//            id.show(10, 10, 10, 10); //This will show an InteractionDialog with components
       
});
        hi
.show();
   
}


Shai Almog

unread,
Jun 21, 2020, 10:56:26 PM6/21/20
to CodenameOne Discussions
Thanks, I see the problem. It will be fixed for the next update.

James Hastings

unread,
Jun 22, 2020, 12:56:37 AM6/22/20
to CodenameOne Discussions
OK, thank you. When is the next update?

Shai Almog

unread,
Jun 22, 2020, 10:20:50 PM6/22/20
to CodenameOne Discussions
We release an update of Codename One every Friday.
Reply all
Reply to author
Forward
0 new messages