Issue with creating an e-mail with NGDesktop

Hi

We use the following code to create an e-mail (not sending it yet):

application.showURL(“mailto:aa@abc.com?Subject=Test&Body=Test”);

This opens a new e-mail from the default e-mail-client.

But with NGDesktop this also opens a new instance of NGDesktop with a blank page.

How could we omit this opening of a new NGDesktop instance. I’ve tried to append a second parameter (“_self”) to application.showURL but then nothing happens (no new e-mail).

Thanks for any suggestions

Roland

Environment: Servoy 2020.12.1 / Windows 10

this is a bit tricky what that should do

are we expecting that showURL() is always going to the system and the browser again to show something?

or do we also want to use it for just showing quickly another webpage that we just want to show and maybe interact with ?

showUrl could also be used for example with:

application.showURL(“sameorothersoluton/index.html”);
application.exit();

so my feeling is that the “_self” should just do that… But i am not sure what “_blank” or “mywindow” as a target should then do…

What we can do is for example add a method on plugins.ngdesktoputils.showExternal(url);

an that url is then passed to the system to process and application.showUrl() just opens NGDesktop windows.

Thanks for your reply, Johan. I’ve opened a case for that: https://support.servoy.com/browse/SVY-16573

In the meantime you can basically do something like this:

			var osName = application.getOSName();
			if (/Windows/.test(osName)) {
				plugins.ngdesktoputils.executeCommand('rundll32', ['url.dll,FileProtocolHandler', url]);
			} else if (/Linux|Freebsd/.test(osName)) {
				plugins.ngdesktoputils.executeCommand('mozilla', [url]);
			} else if (/Mac/.test(osName)) {
				plugins.ngdesktoputils.executeCommand('open', [url]);
			}

‘url’ is the URL to be opened.
I’m not 100% sure about Linux, but Mac and Windows work.

Thanks for this workaround, Robert!