Groups > dBase > dBase programming > Re: Avoid Appearance of "Not Responding"




Re: Avoid Appearance of "Not Responding"

Re: Avoid Appearance of "Not Responding"
Fri, 28 Mar 2008 17:55:31 -070
"Brian Frederick" <b.frederick@comcast.net> wrote in message 
news:86i4QfTkIHA.1812@news-server...
> In my dBASE PLUS 2.61.3 application, there are a couple of routines that 
> process through the records in my database and may take 30 minutes or so. 
> They are maintenance operations and are not used often.  The application 
> appears to the user as if it is locked up and Windows may report it as 
> "not responding" when in fact it is actually processing.  I have
sat at 
> another networked computer and tracked the status of the operation.  The 
> computer running the routine doesn't update the screen obviously so the 
> program appears to be locked up.  Do you have a suggestion for avoiding 
> this behavior?  If I need to write something to the screen, how do you 
> suggest I do it?  A msgbox would be agravating to the user and the program

> seems to disregard updates to text controls.
> Thanks

I just glanced at this post, so if I missed something let me know.

You can control this if it is caused by a loop you are running as follows
nCnt = 0
do
    _app.executemessages()
    nCnt++
until nCnt = 100000

You can make the loop a little faster with the following technique:

nCnt = 0
nCnt2 = 0
do
    nCnt2 ++
    nCnt++
    if nCnt2 = 333
       _app.executemessages()
       nCnt2 = 0
   endif
 until nCnt = 100000

Also look at the help on allowYieldOnMsg
Its a global setting, set it as follows:
_app.allowYieldOnMsg = true

Hope this helps.

Greg Hill


Post Reply
Avoid Appearance of "Not Responding"
Fri, 28 Mar 2008 19:57:09 -050
In my dBASE PLUS 2.61.3 application, there are a couple of routines that process
through the records in my database and may take 30 minutes or so.  They are
maintenance operations and are not used often.  The application appears to the
user as if it is locked up and Windows may report it as "not
responding" when in fact it is actually processing.  I have sat at another
networked computer and tracked the status of the operation.  The computer
running the routine doesn't update the screen obviously so the program appears
to be locked up.  Do you have a suggestion for avoiding this behavior?  If I
need to write something to the screen, how do you suggest I do it?  A msgbox
would be agravating to the user and the program seems to disregard updates to
text controls.
Post Reply
Re: Avoid Appearance of "Not Responding"
Sun, 30 Mar 2008 22:30:04 -050
Brian,

Besides Greg's suggestion, sounds like you should drop in a progress form to
update the screen with progress of the various maintenance tasks as they are
completed.  I prefer using jpprogress.cc from the duflp because it includes a %
completed. 

HTH,
Mark

Brian Frederick Wrote:

> In my dBASE PLUS 2.61.3 application, there are a couple of routines that
process through the records in my database and may take 30 minutes or so.  They
are maintenance operations and are not used often.  The application appears to
the user as if it is locked up and Windows may report it as "not
responding" when in fact it is actually processing.  I have sat at another
networked computer and tracked the status of the operation.  The computer
running the routine doesn't update the screen obviously so the program appears
to be locked up.  Do you have a suggestion for avoiding this behavior?  If I
need to write something to the screen, how do you suggest I do it?  A msgbox
would be agravating to the user and the program seems to disregard updates to
text controls.
> Thanks
Post Reply
about | contact