Carrie, If Maptitude has a function/call to check for a keystroke, do the following: In the loop, every 10,000th (or 100,000th?) iteration, check for a keystroke - if none, continue; if a key has been pressed, jump/abort out of the loop.
I'm an ol' Fortran programmer that's trying to get the hang of this "object-oriented" style of programming. John Digi-MAP A FINE is a TAX for doing bad - a TAX is a FINE for doing good. ________________________________ From: Carrie Hobbs <[email protected]> To: [email protected] Sent: Mon, April 18, 2011 5:18:36 PM Subject: RE: [Maptitude] Re: Interrupt Infinite Loop Thanks for the suggestion, but I’m looking for a way to break out of the infinite loop after the code has started running. I don’t think I can change the code after it has started running. The only way I know how is to close all of Maptitude with the task manager. Carrie Hobbs Senior Technical Consultant __________________________________________________ BEGHOUCONSULTING, INC. 2200 Powell Street, Suite 460, Emeryville, CA 94608 T: 510-597-7500 x213 | F: 510-597-7501 From:[email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Monday, April 18, 2011 12:31 PM To: [email protected] Subject: [Maptitude] Re: Interrupt Infinite Loop Hi: In general you could use "error handling" to try to catch such cases. There is a topic on the subject in the Online Help. Maptitude Mapping Software Group Moderator --- In [email protected], "hobbsies2" <chobbs@...> wrote: > > > I was actually looking for a solution for when I am testing new code that >accidentally has an infinite loop. > > However, I didn't know about the progress bar feature. I'll definitely look >into adding that in for some of my longer code. > > > --- In [email protected], "dr_haspel" mhaspel@ wrote: > > > > > > > > Have you tried including a progress bar in the loop? The > > CreateProgressBar() >command allows inclusion of a "cancel" button on the progress bar. > > > > > > > > --- In [email protected], "hobbsies2" <chobbs@> wrote: > > > > > > Does anyone know of a way to break out of the GISDK code while it is > > > stuck >in an infinite loop? Currently I've been using the task manager to end the >Maptitude process, but it would be nice if there was a way that did not >involve >closing out of Maptitude. > > > > > > Thanks, > > > Carrie > > > > > >
