On 10-05-2019 14:58, Ron Tarrant wrote:

On Fri, 10 May 2019 12:58:00 GMT, Ron Tarrant wrote:

On Thu, 9 May 2019 22:27:16 +0200, Mike Wey wrote:

[stuff deleted] a way to do that...

I came across this tidbit in which Main is called recursively and an extra signal is attached until Main quits. I tried a few ways to implement this, but couldn't get it to work.

So I have a couple of questions:

1) Is this possible in GtkD?
2) Any thoughts on implementation?

I forgot to include the link: http://www.getoffmalawn.com/blog/blocking-gtk-signal-handlers-without-freezing-your-application

That should be possible.

The get_something_async function in D would be something like this:

string get_something_async()
{
     gulong id;

     void activate(Entry entry)
     {
	Signals.handlerDisconnect(entry, id);
         Main.quit()
     }

     id = entry.addOnActivate(&activate);

     Main.run();

     return entry.getText();
}