Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wait Window....

Status
Not open for further replies.

RFanslow

Programmer
Jul 16, 2014
24
0
0
US
Hi All

i seem to be having some issues, a recent rebuild of the executable has brought out a 1000 issues, mainly
wait window "blah blah" NOWAIT TIMEOUT 1, while this seems to be in all of the code everywhere,

what happens is this wait statement never goes away until a users hits a key,

Anyone ever seen code used like this to use both statements, more oever anyone ever seen it work in previous versions as some of this code is actually from FPW 2.6

looking for some insight as to why now its not working in version 7.0 rebuild

Fanz
 
Hi Fanz,

What you are seeing is perfectly correct.

The following applies to VFP 6.0 and later:

Hackfox said:
In fact, the TIMEOUT clause is ignored if NOWAIT is specified, and the message clears only if a keystroke is pressed or a WAIT CLEAR command is issued.

Don't ask me why. It's just the way it is.

Personally, I would never use a TIMEOUT clause. Apart from the fact that the above syntax doesn't work, I believe it is poor user interface. If I were you, I would go through the app, changing all of the above statements to messageboxes - and definitely without any timeout.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Checked what we said in the Hacker's Guide and it includes:

"The many clauses of WAIT that were added over the years can lead to some commands that look like they should work, and don't cause an error message, but don't give the expected response. For example,

WAIT WINDOW NOWAIT "Processing..." TIMEOUT 30

might be interpreted as "Display this message, let me continue processing, and then clear the message after 30 seconds." In fact, the TIMEOUT clause is ignored if NOWAIT is specified, and the message clears only if a keystroke is pressed or a WAIT CLEAR command is issued."

I don't see that paragraph in the VFP 3 version of the book, but it is in the VFP 6 version, so either it changed between 3 and 6, or we didn't notice until the second time around. (The latter is definitely possible because we had different a tech editor the second time.)

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top