Jean-Jacques Wagner wrote:

> What to do when the compiler does not accept new variable
> (explicitvariables?, so it is well set to false). Your done,
> your script is not working anymore. it disappear and come again.

Short answer:

Don't use the explicitVariables global property; use the "Strict Compilation Mode" option in Preferences instead.


TL/DR answer:

The explicitVariables global property was originally added to MetaCard for SuperCard compatibility, but neither community used it universally which gave rise to a problem:

If any code in the message path doesn't conform to the requirements of explicitVars, that script won't load and an error will be thrown.

After looking at this problem in depth, the folks at RunRev came up with a very clever solution that provides the strictness some prefer with explicitVars but also lets them use any other code that doesn't conform:

When you set the "Strict Compilation Mode" option to true in Preferences, explicitVariables is set to true, but only momentarily during compilation. This allows the engine to detect any issues with non-conformance to explicitVars, but also allows any other script to be non-conformant without error.

So now you can write as you like to write, the authors of any libraries you use can write as they like to write, and all the code will play nicely together.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to