I’m getting “Can’t use the dialog plugin in a none Swing thread/environment” in the smart client in both developer and server, 5.01 & 5.1. Here’s the line of code from the error handler, e is the exeception object:
I have the same problem having tried to set up Usermanager Pro pluging for file streaming.
My code is:
var vSuccess = arguments[0], // boolean success; can be false if the user cancelled
vWasCancelled = arguments[1], // boolean isAborted; true if the user cancelled
vMethodArguments = arguments[2]; // method arguments array given when the transfer was started
if (vWasCancelled) {
// the user cancelled
// nothing went wrong, so exit
return;
}
if (vSuccess) {
databaseManager.refreshRecordFromDatabase(foundset,-1)
// file transfer was successful
plugins.dialogs.showInfoDialog('File transfer', 'The file was successfully transferred!', 'OK');
}
else {
// file transfer failed
plugins.dialogs.showErrorDialog('File transfer', 'The file could not be transferred!', 'OK');
}
I am not using webclient at all, only smart client, and I get the same error "Can’t use the dialog plugin in a none Swing thread/environment.
then the callback method is not executed by calling our api (IClientPluginAcces.execute()) but it is directly called in its own thread.
And we dont allow none swing thread to show dialogs.
The UserManager executes the method in a way that was explained to me by Johan. So I don’t feel guilty . Are you maybe using an older version of the plugin? The latest and greatest is available from our website…