best practice relating to using InfiniteProgress while executing socket IO from a modal Dialog

10 views
Skip to first unread message

Mark Bolduc

unread,
Feb 7, 2020, 7:20:01 PM2/7/20
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA Netbeans 11
Desktop OS Windows 10 Pro
Simulator Latest
Device Simulator, Android, IOS

I created a RunInfiniteDialog thread that executes:
InfiniteProgress ip  = new InfiniteProgress();
InfiniteProcDialog = ip.showInfiniteBlocking();

Have 2 methods to call:
    public void showInfiniteDialog() {
        showInfiniteDialog = true;
    }
    public void disposeInfiniteDialog() {
        disposeInfiniteDialog = true;
    }

This works properly (In that I get the desired blurred dialog with spinning object) except when I  execute a save which in turn executes socket IO

Note: This process that executes the save is a Dialog it's self.

Wondering is there another process I can use to show progress is occurring to the user?
Note To my knowledge, ToastBar does not work within a modal Dialog.

Thoughts?

Regards.

Shai Almog

unread,
Feb 8, 2020, 12:30:28 AM2/8/20
to CodenameOne Discussions
You don't need a thread to show the dialog. Sorry I didn't understand the problem description at all.

Mark Bolduc

unread,
Feb 8, 2020, 7:22:13 AM2/8/20
to CodenameOne Discussions
Sorry, The Dialog seems to be blocked and does not appear in some cases where my App does some socket IO tasks that block.

I see this is too ambiguous, I will try to provide more clarity.

Regards.
Reply all
Reply to author
Forward
0 new messages