No Control Break?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JackieBlue1970
Posts: 64
Joined: Thu Jan 16, 2020 10:28 pm

No Control Break?

Post 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.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: No Control Break?

Post 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
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: No Control Break?

Post by dunbarx »

Klaus.

? :wink:

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
SparkOut
Posts: 2984
Joined: Sun Sep 23, 2007 4:58 pm

Re: No Control Break?

Post by SparkOut »

And inside the loop include a line

Code: Select all

wait 0 milliseconds with messages
to ensure the engine does have "moment" to deal with reading the keyboard instead of giving ALL the cycles to the loop.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: No Control Break?

Post by Klaus »

dunbarx wrote: Tue Feb 04, 2020 12:59 am Klaus.
? :wink:
:D :D :D
JackieBlue1970
Posts: 64
Joined: Thu Jan 16, 2020 10:28 pm

Re: No Control Break?

Post by JackieBlue1970 »

Thanks everyone. I'll give the cmd "." a try next time. Jack
Post Reply