Basically whenever I get into the unfortunate problem of my code creating an infinite loop, due to the "live" nature of LiveCode it forces the application to constantly run and deny me access to the code to fix my mistake.
The only solution is to force close LiveCode everytime which hardly makes my development 2x faster according to your claims.. surely there is some sort of "I made a mistake, temporarily pause the application and let me fix my code" type of button?
Can't escape infinite loop without force closing LiveCode..
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Can't escape infinite loop without force closing LiveCod
Hi,
Did you try to type command and "." on the messagesBox ?
Jean-Marc
Did you try to type command and "." on the messagesBox ?
Jean-Marc
https://alternatic.ch
Re: Can't escape infinite loop without force closing LiveCod
As mentioned, command -. sometimes stops the loop, you can also attempt to click the messages button on the livecode bar ONCE then walk away for a minute or so and see if it took.
One thing you can do if there is a chance that you'll have a runaway is to put
wait 5 milliseconds with messages -- allows other things to happen in this time space
at strategic locations. Might be a good idea to just get into the habit. this should allow just enough breathing room for a messages button click to be seen and responded too.
Once you get all the kinks out of your logic you can of course remove the waits.
One thing you can do if there is a chance that you'll have a runaway is to put
wait 5 milliseconds with messages -- allows other things to happen in this time space
at strategic locations. Might be a good idea to just get into the habit. this should allow just enough breathing room for a messages button click to be seen and responded too.
Once you get all the kinks out of your logic you can of course remove the waits.
Re: Can't escape infinite loop without force closing LiveCod
All too true. Recursion is usually detected and halted internally, I think after a few hundred thousand passes. Runaway loops, though, are not.
I have found that Cmd-period invariably works in those cases.
Not always, though.
Craig Newman
I have found that Cmd-period invariably works in those cases.
Not always, though.
Craig Newman