dialog plugin error in smart client

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:

	  plugins.dialogs.showErrorDialog( "Error",  e.getMessage(), 'OK');

This message relates to using the dilaogs plugin in the Webclient.

Are you sure you’re using it in the Smart Client?

If so, please create a case with sample solution and file it in our support system.

Paul

Smart client, no doubt. I’ll make a case.

do specify how that method that calls the dialog plugin is getting called.

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.

I am using Servoy 4.1.6, Sybase 10 and MacOS.

Be grateful for any help.
Bevil

this is the callback method from the UserManager plugin, right?

you could try using: application.setStatusText = …
instead of using the dialog plugin

just for test…

Hi Harjo

Yeah, it is from the usermanager pro plugin. I am finally changing over to that plugin :)

If I use Application.setStatusText, it is only going to put it in the bottom left of the window, right?

Is there a reason that dialog plugin just doesn’t work here??

:)

Bevil

And yes, it does work… I am just confused as to why the dialog doesn’t work. It works everywhere else…

Bevil

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.

So the problem is in the usermanager plugin.

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

Plugin downloaded and installed last week, so I guess it is the current version. Is there anything I can do to work around it??

Not that I know of. I don’t know how to work around that either… I will try to sort it out with Servoy.

LS,

I am having the same error in my console on Mac OS X 10.7 with java 26.
Still only in the console…