Skip to content

Can't open configure dialog window in another thread? #135

@jacktang

Description

@jacktang

Hello,

I try to write ConfigureXXXTask like ConfigureApiSettingTask

    @Override
    public void run() {
        try {
            Utils.logToConsole("Thread is running");
            // ConfigDialogManager.configDialogManager().clearConfigDialog();
            // blocks the thread until the config dialog is available
            final JDialog configDialog = ConfigDialogManager.configDialogManager().getConfigDialog();
            Utils.logToConsole("configDialog: " + configDialog);

            GuiExecutor.instance().execute(new Runnable(){
                @Override
                public void run() {
                    configure(configDialog, level);
                }
            });

        } catch (Exception e) {
            Utils.logError("" + e.getMessage());
        }
    }

and scheduled by

MyCachedThreadPool.getInstance().execute(new ConfigureXXXTask(...));

But the configure dialog is not going to show up. And the logging is

18:26:26:976 IBController: thread is running

I invoke clearConfigDialog() method before getting the config dialog and failed. Could you please tell me how to re-open config dialog in another thread? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions