Timeout

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 534
Joined: Thu Jan 28, 2010 9:34 am

Timeout

#1 Post by omni »

Roger,

I am trying to add a timeout to our main app login screen. If over 2-3 minutes, want to exit/quit. The timeout acts as if ok is pressed instead of cancel, which causes a problem with out edits. Any way to know that it bypassed the time, or to make it exit with a cancel?

thanks

Fred
omni

omni
Posts: 534
Joined: Thu Jan 28, 2010 9:34 am

Re: Timeout

#2 Post by omni »

Not a real problem. Just curious.

I used nseconds to control it when exiting the dcread gui.

Fred

User avatar
Tom
Posts: 1173
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Timeout

#3 Post by Tom »

Hi, Fred.

DCREAD GUI TIMEOUT <anTimeOut> accepts a numeric value (timeout in seconds) or an array which contains two elements. If an array is used, the first element is the timout in seconds, and the second value is any codeblock. You may place "{||DC_ReadGuiEvent(DCGUI_EXIT_ABORT,GetList)}" there, which should cause (I didn't try it) the dialog to exit without storing the values inside your controls. If this codeblock returns a value (.T. or .F.), DCREAD reacts on this value (.T. causes the dialog to exit, but using EXIT_OK as you found out). Instead of exiting directly, you may restore the values of your controls there and return .T. afterwards (DC_GetOrigSet(GetList)).

So, it's up to you. ;)

Edit: To be honest, it's not very elegant to kill a data entry dialog with a timeout. The user may have a reason to pause (telephone call? restrooms?), while the data entered before may still be important and valid.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Timeout

#4 Post by rdonnay »

Fred -

Tom gave you the best technical answer.
If you can show me the code for your login, I may be able to give you a quick fix.

Roger
The eXpress train is coming - and it has more cars.

John Hohensee
Posts: 26
Joined: Fri Mar 04, 2011 7:35 am
Location: San Bernardino, CA USA
Contact:

Re: Timeout

#5 Post by John Hohensee »

This little routine uses a TIMEOUT after the printer is selected. The idea could also be used for a LOGIN routine to insure that the program is started within a required time.
Attachments
TIME.ZIP
TIMEOUT ROUTINE
(1.82 KiB) Downloaded 696 times

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: Timeout

#6 Post by GeneB »

Edit: To be honest, it's not very elegant to kill a data entry dialog with a timeout. The user may have a reason to pause (telephone call? restrooms?), while the data entered before may still be important and valid.
What about a user select option in system setup to time out/not time out, with a selectable number of minutes.
What about a pause button on a data entry screen to by-pass the timout ?
Just a Saturday afternoon shade tree thought.

John Hohensee
Posts: 26
Joined: Fri Mar 04, 2011 7:35 am
Location: San Bernardino, CA USA
Contact:

Re: Timeout

#7 Post by John Hohensee »

In my upload TIME.ZIP this has a variable npTime witch is set in the Config portion of the program. It could also be sent at the time of calling. This would make each call a different time before calling quits.

Post Reply