Page 1 of 1

Add Timeout option to MessageRequester()

Posted: Tue Jan 17, 2017 2:53 am
by Tristano
There are some use-cases where one might wish the MessageRequester() dialog to be available only for a given number of seconds, and then close -- if it was a "yes/no" dialog, it should then have a default value returned.

For example, applications running in the background might want to popop a MessageRequester() to inform user of some changes that have occured and which might require some user interaction (eg: like firewalls notifications, and so on).

I think this option is particularly important because of the code-execution blocking nature of MessageRequester(). An optional time-out feature would grant that execution would not be stopped for more than a given time if the PC is unattended at the time the MessageRequester() is popped up.

This optional feature shouldn't break backward compatibility with codes already using MessageRequester().

Re: Add Timeout option to MessageRequester()

Posted: Tue Jan 17, 2017 3:13 am
by Mistrel
You would probably want to create your own custom window for this type of behavior and it's a very unusual kind of behavior for a dialog box. I can probably count the number of times I've seen an auto-dismissing dialog on one hand and I can't even name where I'd seen them.

What is your use case for this?

Re: Add Timeout option to MessageRequester()

Posted: Tue Jan 17, 2017 3:50 am
by TI-994A
A usable alternative, for the time being. :wink:

> MessageBox with multi-line text & auto-close timer

Re: Add Timeout option to MessageRequester()

Posted: Tue Jan 17, 2017 9:52 am
by Tristano
TI-994A wrote:A usable alternative, for the time being. :wink:

> MessageBox with multi-line text & auto-close timer
Thanks @TI-994A! This is a really good solution, and it works exactly the way I imagined it.

I've added a link to it in my libraries resource page:

https://github.com/tajmone/purebasic-ar ... r/libs#gui