: ...build and execute query
: tableFrameObject.home()
: When I do this I get an error message in the status box saying that the command
: is invalid during a refresh.
: To avoid this, I added sleep(100)
: ...build and execute query
: sleep(100)
: tableFrameobject.home()
: This works, the tableframe displays the first record at the top. However, it
: makes the whole screen flash white. I am using Paradox 7 in Windows 3.11.
: Any ideas on how I can avoid this white flash? I have tried using
: delayscreenupdates, but to no avial.
How about trying something like this (please check syntax;
I haven't tried it myself):
try
tableframeobject.home()
onFail
reTry
endTry
If this works, it should avoid the potential problem if your
program failing because it is being run from another computer
where it would need a different sleep() value to work correctly.
--
============================================================
Rick Carter cart...@email.uc.edu rca...@tso.cin.ix.net
============================================================
--
_________________________________
MDEL...@SierraMicro.Com
President
sierramicro
Another alternative would be to do the home() after all outstanding events have
been processed. To achieve this, you can use postaction which puts the message at
the end of the queue. So try:
tabeFrameObject.postAction(DataBegin)
>Your suggestion:
>> tabeFrameObject.postAction(DataBegin)
>Works perfectly!!! The screen doesn't blank out and it updates correctly
>regardless of whether it is running on a slow or fast maching.
I have found that in quite a number of places a "sleep(100)" statement is just
the right kind of grease to get things running smoothly again. Even in 32-bit
mode, this practice of giving long-running routines an =explicit= opportunity
to process outstanding Windows messages seems to make "those weird things that
happen" ... happen a lot less often.
"Sleep()" with no parameters apparently processes only one Windows message;
not terribly useful. It doesn't take a very large "Sleep()" value to assure
that all outstanding messages get processed, but it does seem to make a
difference that some number is included.