Page 1 of 1

Livecode really needs a BREAK button to keep from crashing!!

Posted: Fri Apr 19, 2013 11:57 pm
by William Jamieson
When programming in most other development environments like C+ etc., there is a break button that you press any time your code starts to run away and freeze your computer. Why do we livecoders just have to sit back and take it and always lose our work when other programmers just hit this little button? Aren't we tired of Livecode freezing when ever you make a mistake programming? Programming becomes so high risk I can swear I'm in the X-games. I get scared now to hit the run button and I have OCD when it comes to saving my project, creating back-ups, and praying. Or maybe its just me that has this problem, but there has to be an easy fix for the stupid people like me who don't write code perfect on the first try. I only write this because I have seen others in the community frustrated with this problem, I leave this to open discussion to see if anyone agrees or disagrees.

-Will J.

Re: Livecode really needs a BREAK button to keep from crashi

Posted: Sat Apr 20, 2013 12:03 am
by sturgis
On mac try hitting cmd-.

on win it should be ctrl-.

Also, most of us, (after a few instances like you are having) put an escape hatch within loops so we can get out if need be.

something like

if the shiftkey is down then exit repeat

And if you don't want to dig all those escape hatches out you can use "the environment" to check if the escape should work


if (the environment is "development") and (the shiftkey is down) then exit repeat

In most cases cmd-. or ctrl-. will work to break a runaway, but not always. Coding a break into the repeat does work. Also, you can do something simpler like inserting a "wait 0 with messages" into your loops so that its easier to get a response from cmd-. A wait with messages does add a little overhead though so you might consider removing or checking the environment for that one too. So that it doesn't fire in your standalone.

Re: Livecode really needs a BREAK button to keep from crashi

Posted: Sat Apr 20, 2013 7:41 am
by William Jamieson
Wow thanks. I would have never thought of those. Its not as simple as a button but it will work for me.

Re: Livecode really needs a BREAK button to keep from crashi

Posted: Sat Apr 20, 2013 9:35 pm
by paul_gr
William Jamieson wrote:there has to be an easy fix for the stupid people like me who don't write code perfect on the first try.
Not stupid.
All of us write code that crashes or stops responding; I do it frequently :D

cheers
Pau