Confirm dialog in close solution

Hi,

In my onCloseSolution method I have a dialog that asks if the user is sure that he wants to quit the program.
That works like expected.

But when killing a client using adminpages, then I get the following error:

Can’t use the dialog plugin in a none Swing thread/environment

Logic, because I killed the client from adminpages.
Is there a way that I can check if close solution is done manually by the user or a kill by adminpage or kill by a plugin (I know there are plugins that can kill clients also).

Martin

yes, the onCloseSolution method will receive an argument[0] true when you close the client by the admin-page :-)

OK thanks Harjo. Didn’t know that

[quote=“martinh”
But when killing a client using adminpages, then I get the following error:

Can’t use the dialog plugin in a none Swing thread/environment

Logic, because I killed the client from adminpages.
[/quote]

That error should not be generated for smart clients.
Where do you get that error?
Do you really et that error in the Smart clients log on the client? Or on the servers log?
Because you cant show a dialog in the webclient.

Hi Johan,

This message is visible in the log on the admin pages.
It occurs when a smart client is killed by the administrator

So it is not a message on the screen. Just in the log.
There is no webclient involved here.

Martin

Very weird if you see that in the log of the server.
Because those logs are really web/headless or batch processor clients.

What is the full log line you see? including the thread where it happens and do you see a full stacktrace?

I don’t have the exact logline anymore.
I’ll undo the fix I made (argument check, like Harjo suggested, because that works)

If I remember well, it was just 1 line in the log.

I’ll try to reproduce it (Servoy 4.1.5, Java 1.6u17)