Page 1 of 1

Bug

Posted: Tue Jun 28, 2011 5:20 pm
by xLite
I understand LiveCode is meant to be live but how do you actually stop it from being live? I have a timer set up that displays an alert every second and I can't stop it. This is probably the reason other languages don't use this development model..

Any way to stop this or is this just an unfortunate flaw in the design?

Re: Bug

Posted: Tue Jun 28, 2011 5:27 pm
by Dixie
Post your script...

Dixie

Re: Bug

Posted: Tue Jun 28, 2011 5:56 pm
by townsend
Isn't there some global value that contains, whether or not you're in Edit or Run modes?

Re: Bug

Posted: Tue Jun 28, 2011 6:14 pm
by xLite
It's a simple function that calls itself every second.

Code: Select all

on randomFunction
   answer "test"
   send randomFunction to me in 1 second
end randomFunction
If I call that, it will go on forever. I basically just need some way to disable or reset a program without force closing the LiveCode process?

Re: Bug

Posted: Tue Jun 28, 2011 6:20 pm
by Dixie
Hi xlite...

One way to get out of such a predicament... :D

Code: Select all

on mouseUp
   randomFunction
end mouseUp

on randomFunction
   if the optionKey is down then
      beep
      exit to top
   end if
   add 1 to fld 1
   send "randomFunction" to me in 1 sec
end randomFunction
be well

Dixie

Re: Bug

Posted: Tue Jun 28, 2011 6:47 pm
by xLite
Dixie wrote:Hi xlite...

One way to get out of such a predicament... :D

Code: Select all

on mouseUp
   randomFunction
end mouseUp

on randomFunction
   if the optionKey is down then
      beep
      exit to top
   end if
   add 1 to fld 1
   send "randomFunction" to me in 1 sec
end randomFunction
be well

Dixie
So if I don't add this code, the only way out is to force close LiveCode? Great..

Re: Bug

Posted: Tue Jun 28, 2011 6:56 pm
by Dixie
Xlite...

You asked... You created an infinite loop and you wanted a way to get out of it ...

Dixie

Re: Bug

Posted: Tue Jun 28, 2011 7:01 pm
by xLite
Dixie wrote:Xlite...

You asked... You created an infinite loop and you wanted a way to get out of it ...

Dixie
I thank you for taking the time to help but I meant what do I do if I accidently create a loop of "answer" commands accidently and don't have access to the code panel or the save button, surely there must be a way to turn off the live feature so that I don't have to force close and lose my unsaved work?