No Control Break?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 64
- Joined: Thu Jan 16, 2020 10:28 pm
No Control Break?
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?
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
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?
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
?

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?
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.
Code: Select all
wait 0 milliseconds with messages
-
- Posts: 64
- Joined: Thu Jan 16, 2020 10:28 pm
Re: No Control Break?
Thanks everyone. I'll give the cmd "." a try next time. Jack