Build-time v Run-time

Robert Brenstein rjb at robelko.com
Fri Feb 15 12:23:54 EST 2013


On 15.02.2013 at 17:56 Uhr +0100 Graham Samuel apparently wrote:
>Another naive questions, but this hasn't happened to me before, or 
>at least I haven't recognised it properly.
>
>I'm looking at some code written by an associate. As normal (to me) 
>it's a mainstack and a lot of substacks. I want to tinker with the 
>code, so I open the mainstack in the LC IDE, and immediately the 
>program starts to run, even though the Edit tool is active in the 
>toolbar rather than the Browse tool - it starts up and does stuff, 
>like the IDE does. I don't want that, I want the code to remain 
>entirely passive until I tell it to run!
>
>How does a stack get into 'instant run mode' like that, and what can 
>I do to stop it? Is there some way of creeping up on it so that no 
>handler is executed?
>

Apparently, your associate coded something in one of the openXxxx 
handlers to start execution. Those handlers run regardless of the IDE 
mode. To achieve what you want, the code should check the environment 
(look it up in the dictionary) and do not execute if it is 
"development". If you want to be able to execute after all, to 
simulate standalone execution, you may add checking whether the alt 
key is down, and if it is down, execute regardless of the environment.

Robert




More information about the use-livecode mailing list