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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display status

Status
Not open for further replies.

kenndot

Programmer
May 15, 2001
316
US
Hi all

I'm writing an error function and want to use 'display status' to write that information to a text file. What I am wondering is if there is a way to stop the function from prompting you to "Press any key to continue" I would like it to do this without any prompt at all for the user. How can I accomplish this.

Also, I am using the ASSERT function and I get no errors, but the box never shows. Here's what I have... help?

lDebug = .f.
If !lDebug
assert ldebug MESSAGE( cString1 + CHR(13) + ;
cString2 + CHR(13) + ;
cString3 + chr(13) )

endif

I don't really know about this function yet, so any help is appreciated. Thanks.
 
Try using "MessageBox(" instead of "Message(" ..

I can't answer the other part of the question.
 
Have you issued SET ASSERTS ON?

Also ASSERT is only tested during development and are not tested in the runtime version of your app.

Neil "I like work. It fascinates me. I can sit and look at it for hours..."
 
Although the syntax in the MSDN calls for only MESSAGE within the ASSERT function, I tried it because sometimes the strangest things work, but to no avail.

Any other ideas?
 
Are you are trying to test for a specific scenario, or just trap for VFP errors (eg Error 3: File in use)?

Neil "I like work. It fascinates me. I can sit and look at it for hours..."
 
You can do a

LIST STATUS TO MyFile.TXT NOCONSOLE

Which will supress the 'Press any key...' message.
Dave S.
 
...or another way (useful if you want to add more information in the furture):

SET ALTERNATE TO C:\ERROR.TXT ADDITIVE
SET ALTERNATE ON
SET CONSOLE OFF

? 'Status List'
? '-----------'
LIST STATUS
?
? 'Objects'
? '-------'
?
LIST OBJECTS
?

SET CONSOLE ON
SET ALTERNATE OFF
SET ALTERNATE TO

Neil "I like work. It fascinates me. I can sit and look at it for hours..."
 
I also use

LIST MEMORY TO MyMemFile.TXT NOCONSOLE
Dave S.
 
thank you all very much! That was exactly what I was looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top