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

How to stop a Harbour app (ALT-C or CTRL-C)?

Status
Not open for further replies.

mbinfo

Programmer
Aug 21, 2002
27
0
0
BR
I am converting a large application to Harbour and faced a problem. If a program loops I need to stop it. How?
ALT-C and CTRL-C does not work.
Any help?

Ulisses
MBINFO

 
Best would be to check for a specific keypress by calling
<pseudocode>
whatKey = Inkey()
if whatKey == K_CANCEL
quitLoop = .t.
endif
</pseudocode>

Usually, during initializing a large app, Alt-C for Cancel would be disabled.
 
OK. How can I enable the ALT-C cancel routine?
I mean, the program entered an unknown routine between several of them and (I presume) some litlle difference of implementation led to the loop. If I am testing a single new routine and don´t know if everything is going right I usually place several one line alerts on the bottom of the screen saying "I passed here", "This is comparison x", "The result was y" etc. to know it´s initial behaviour. After the initial tests these alerts are completely removed.
 
Have a look at the SetCancel() function, and also see AltD() to invoke the debugger (when enabled and linked in)
Be aware that canceling stops the app entirely, so no real post-mortem on what it was doing...
 
Thank you TonHu.

SetCancel() will do the trick. Sorry for the misplaced word "between" in last post. I´m not a native english/american guy. I´m brazilian, so, sometimes words may go wrong in text.
One more comment. This "Clipper" forum is almost completely inactive. Where do the Harbour users go for help? I mean real valuable help from experienced people like you, fBizell, JockMullin, GriffMG and others?

Ulisses / mbinfo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top