Aborting a report preview after one hour
Hi everybody, I am working with a customer app written with VFP8. We had a 'bug' preventing us to do the night backup : someone has left his app opened in a report preview before leaving. So the tables were opened ... Have we a way to abort the report preview window after a timer (one hour for example) ? Thanks in advance The Foxil ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/54118023.8030...@wanadoo.fr ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: Aborting a report preview after one hour
What I have done in the past is bind an event to windows messaging - dump a file in a folder - event then fires and vfp goes through shutdown whatever that may be in your application. My framework handles that fairly gracefully and gives a 10 minute warning to any users to that the application is going to shutdown and to close out or loose the latest editing. All things are buffered in data entry so any loss if user doesn't comply or has gone home will be only the last editing effort. Makes close the application for multiple recalcitrant users an easy task. -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Jean MAURICE Sent: Thursday, 11 September 2014 8:58 PM To: profoxt...@leafe.com Subject: Aborting a report preview after one hour Hi everybody, I am working with a customer app written with VFP8. We had a 'bug' preventing us to do the night backup : someone has left his app opened in a report preview before leaving. So the tables were opened ... Have we a way to abort the report preview window after a timer (one hour for example) ? Thanks in advance The Foxil [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/003401cfcdb3$9caedfa0$d60c9ee0$@ozemail.com.au ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: Aborting a report preview after one hour
Apologies - double reply - must have clicked on Reply - All -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Darren Sent: Thursday, 11 September 2014 9:29 PM To: profoxt...@leafe.com Subject: RE: Aborting a report preview after one hour What I have done in the past is bind an event to windows messaging - dump a file in a folder - event then fires and vfp goes through shutdown whatever that may be in your application. My framework handles that fairly gracefully and gives a 10 minute warning to any users to that the application is going to shutdown and to close out or loose the latest editing. All things are buffered in data entry so any loss if user doesn't comply or has gone home will be only the last editing effort. Makes close the application for multiple recalcitrant users an easy task. -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Jean MAURICE Sent: Thursday, 11 September 2014 8:58 PM To: profoxt...@leafe.com Subject: Aborting a report preview after one hour Hi everybody, I am working with a customer app written with VFP8. We had a 'bug' preventing us to do the night backup : someone has left his app opened in a report preview before leaving. So the tables were opened ... Have we a way to abort the report preview window after a timer (one hour for example) ? Thanks in advance The Foxil [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/003601cfcdb3$ec46b290$c4d417b0$@ozemail.com.au ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: Aborting a report preview after one hour
Would it help to use cursors for reports? On 11/09/2014 11:57, Jean MAURICE wrote: Hi everybody, I am working with a customer app written with VFP8. We had a 'bug' preventing us to do the night backup : someone has left his app opened in a report preview before leaving. So the tables were opened ... Have we a way to abort the report preview window after a timer (one hour for example) ? Thanks in advance The Foxil [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/541218e4.1050...@hawthorncottage.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: Aborting a report preview after one hour
I am working with a customer app written with VFP8. We had a 'bug' preventing us to do the night backup : someone has left his app opened in a report preview before leaving. So the tables were opened ... Have we a way to abort the report preview window after a timer (one hour for example) ? I have an unattended shutdown feature in my application. It works like this: My application manager object has a logical property called IsActive, defaults to .F. Most of my control base classes (commandbutton, checkbox, combobox, textbox, etc.) have code in their Click() or GotFocus() methods that set oApp.IsActive to .T. I have a timer whose Timer() method polls oApp.IsActive. The interval defaults to 15 minutes (it's user-configurable though). If Timer() finds oApp.IsActive is .T., it sets it to .F. and exits. However, if it finds oApp.IsActive is .F., it sets another application manager property, KillSwitch, to .T. Then it launches a countdown form with another timer on it, and a big ABORT button. Pressing ABORT sets the application manager's KillSwitch property to .F. The second Timer's interval defaults to 1 second. This Timer's Timer() method maintains a countdown, starting at a user-defined number (defaults to 10). If the countdown has not reached 0, it polls oApp.KillSwitch and if that property is .T., it decrements the countdown value by 1 and displays remaining seconds on the form. If KillSwitch is still .T. when the countdown reaches 0, the Timer() method starts an irreversible process that shuts down the application. If KillSwitch is .F., the countdown timer closes the countdown form and shuts itself off. The ABORT button, being based on my command button baseclass, has already set oApp.IsActive to .T. when it was clicked. So the first timer reverts to its usual behavior and the application continues to run. (I have a second, similar class called EverybodyOutOfThePool, only this one watches for a semaphore file on the server, and if it finds one, it starts a shutdown that cannot be aborted. This one is used to force all users to log out at any time, regardless of what they are doing.) It's a bit more complex than that, but that's basically how it works. Both of these work quite well. The only caveat is that for debugging purposes in development mode, the timers have to be turned off so they don't shut down the application while I'm poking around in the debugger. This is done as soon as the developer responds Yes to a Debug? messagebox. Ken Dibble www.stic-cil.org ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/5.2.1.1.1.20140911192640.01db5...@pop-server.stny.rr.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: Aborting a report preview after one hour
If the data used in the report is shared u should have no problem backing it up. E. On Thursday, September 11, 2014 8:42 PM, Ken Dibble krdib...@stny.rr.com wrote: I am working with a customer app written with VFP8. We had a 'bug' preventing us to do the night backup : someone has left his app opened in a report preview before leaving. So the tables were opened ... Have we a way to abort the report preview window after a timer (one hour for example) ? I have an unattended shutdown feature in my application. It works like this: My application manager object has a logical property called IsActive, defaults to .F. Most of my control base classes (commandbutton, checkbox, combobox, textbox, etc.) have code in their Click() or GotFocus() methods that set oApp.IsActive to .T. I have a timer whose Timer() method polls oApp.IsActive. The interval defaults to 15 minutes (it's user-configurable though). If Timer() finds oApp.IsActive is .T., it sets it to .F. and exits. However, if it finds oApp.IsActive is .F., it sets another application manager property, KillSwitch, to .T. Then it launches a countdown form with another timer on it, and a big ABORT button. Pressing ABORT sets the application manager's KillSwitch property to .F. The second Timer's interval defaults to 1 second. This Timer's Timer() method maintains a countdown, starting at a user-defined number (defaults to 10). If the countdown has not reached 0, it polls oApp.KillSwitch and if that property is .T., it decrements the countdown value by 1 and displays remaining seconds on the form. If KillSwitch is still .T. when the countdown reaches 0, the Timer() method starts an irreversible process that shuts down the application. If KillSwitch is .F., the countdown timer closes the countdown form and shuts itself off. The ABORT button, being based on my command button baseclass, has already set oApp.IsActive to .T. when it was clicked. So the first timer reverts to its usual behavior and the application continues to run. (I have a second, similar class called EverybodyOutOfThePool, only this one watches for a semaphore file on the server, and if it finds one, it starts a shutdown that cannot be aborted. This one is used to force all users to log out at any time, regardless of what they are doing.) It's a bit more complex than that, but that's basically how it works. Both of these work quite well. The only caveat is that for debugging purposes in development mode, the timers have to be turned off so they don't shut down the application while I'm poking around in the debugger. This is done as soon as the developer responds Yes to a Debug? messagebox. Ken Dibble www.stic-cil.org [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1410480585.51183.yahoomail...@web163405.mail.gq1.yahoo.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.