Page 1 of 1
No Control Break?
Posted: Tue Feb 04, 2020 12:14 am
by JackieBlue1970
Is there no way to break a loop once started in livecode? I was reading a text file and had a thousand rows. As a test, I had the row print on in an answer dialog. I couldn't find any way to break the loop so I had to wait until it ended. Any solution? Seems really strange.
Re: No Control Break?
Posted: Tue Feb 04, 2020 12:20 am
by Klaus
Hi Jackie,
your "emergency break" is -> CMD . (Dot)
That will throw an error but also stop your loop.
Or do yu mean some condition in your script to end the loop if e.g. the shiftkey = down?
Best
Klaus
Re: No Control Break?
Posted: Tue Feb 04, 2020 12:59 am
by dunbarx
Klaus.
?
Cmd - period does not throw an error, it just stops execution at that instant, and opens the debugger at the line last executed. Really helpful when things seem to get out of hand.
Craig
Re: No Control Break?
Posted: Tue Feb 04, 2020 8:24 am
by SparkOut
And inside the loop include a line
to ensure the engine does have "moment" to deal with reading the keyboard instead of giving ALL the cycles to the loop.
Re: No Control Break?
Posted: Tue Feb 04, 2020 6:24 pm
by Klaus
dunbarx wrote: ↑Tue Feb 04, 2020 12:59 am
Klaus.
?

Re: No Control Break?
Posted: Tue Feb 04, 2020 9:30 pm
by JackieBlue1970
Thanks everyone. I'll give the cmd "." a try next time. Jack