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.
Naptime (was: Re: Quickest Search)
At 09:35 2014-09-10, Bill Anderson billan...@gmail.com wrote: (NapTime) I did some research on this...after all, this vital detail was somehow missed by all the Hacker's Guide books... Gasp! No! [snip] However, there is zero indication that NapTime is an actual reserved word. It's marked in the help file as such...but I haven't been able to find a conflict by creating an object and adding a property called NapTime. IME, VFP does not necessarily throw an error because a reserved word has been used. The fun only seems to occur when the special meaning of the reserved word is relevant. At one point, I had a table with a column called status. Everything was going fine until I wanted to check the value in one row and typed list or display status. I did not get what I was expecting. I changed the column name. [snip] Sincerely, Gene Wirchenko ___ 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/ ** 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: Naptime (was: Re: Quickest Search)
On Thu, Sep 11, 2014 at 3:02 PM, Gene Wirchenko ge...@telus.net wrote: At 09:35 2014-09-10, Bill Anderson billan...@gmail.com wrote: (NapTime) I did some research on this...after all, this vital detail was somehow missed by all the Hacker's Guide books... Gasp! No! Hard as it is to believe, there were things deep inside the language even we did not tease out. I wonder if NAPTIME is a dBASE-compatible thing; there were a couple of 'reserved' keywords that were on the list just because they were a dBASE or Clipper term, and the Fox Team wanted to avoid hard to chase down incompatible behaviors. A quick web search yields no clues. At one point, I had a table with a column called status. Everything was going fine until I wanted to check the value in one row and typed list or display status. I did not get what I was expecting. I changed the column name. Table and field names can be real problems. I've run into errors while porting APPEND and REPLACE systems into SQL statements. Apparently, the xBase parser could work out the difference between keywords and fieldnames, but the SQL parser was more finicky. -- Ted Roche Ted Roche Associates, LLC http://www.tedroche.com --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- ___ 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/CACW6n4u6OZDVGvFR=xwhrkvta7uf7awvcsgnxp+enw_wwf4...@mail.gmail.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
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.
Re: Naptime (was: Re: Quickest Search)
Ted, We can both come up with many dBase compatible commands (say, SET SQL ON/OFF) and dBase compatible functions (PCOUNT() was better than PARAMETERS() or ID())...but I don't remember a dBase compatible PROPERTY. Bill Anderson At 09:35 2014-09-10, Bill Anderson billan...@gmail.com wrote: (NapTime) I did some research on this...after all, this vital detail was somehow missed by all the Hacker's Guide books... Gasp! No! Hard as it is to believe, there were things deep inside the language even we did not tease out. I wonder if NAPTIME is a dBASE-compatible thing; there were a couple of 'reserved' keywords that were on the list just because they were a dBASE or Clipper term, and the Fox Team wanted to avoid hard to chase down incompatible behaviors. A quick web search yields no clues. --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- ___ 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/ca+o1eng-7ut2ecymu2xr3ydhatedhjjzvyhonhamvgsqt7y...@mail.gmail.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.