Explicit Variables again

Richard Gaskin ambassador at fourthworld.com
Thu Oct 18 23:51:46 EDT 2012


Mark Wieder wrote:

 > Thursday, October 18, 2012, 12:54:22 PM, you wrote:
 >
 >> If you choose to use explicitVars that's your own choice.  But with all
 >> due respect, you're not the only one making plugins.
 >
 > Sure, but as I pointed out, it doesn't affect other plugins. As long
 > as you don't need to compile plugins before using them it doesn't
 > matter whether explicitVars is on or off.

Depends what "on" means. :)

Remember that LiveCode is dynamically compiled - the only copy of a 
script stored with a stack is the source copy, not any tokenized 
version.  So whenever you open a stack, as part of the unpacking its 
scripts are dynamically compiled - and that's when the compilation error 
will occur.

That is, if explicitVars is truly on.

If you're just turning it on via Prefs, in recent versions of LC that 
merely sets a prefs value that causes explicitVars to be turned on only 
for the moment a script is set; at all other times explicitVars isn't 
really on at all (see the previous snippet from their IDE I posted that 
illustrates that man behind the curtain).

But if you turn it on manually via the Message Box ("set the 
explicitVars to true"), then you can see the behavior that happens when 
you try to open a stack that has undeclared vars in its scripts - here I 
get "can't create a variable with that name (explicitVars)".

So the good news is that RunRev's clever revamp of the IDE means we 
never need to think about explicit vars for most projects, so those 
turning it "on" via Prefs will never actually have it on unless they 
open your script and try to save changes.

But the bad news is that it's just one more difference between how the 
IDE works and how the engine works.

So when I wear my T-shirt which reads:

"Know the engine.
  Trust the engine.
  Use the engine."

...I need to add for the good folks at RunRev:

"If you own the engine
  and don't like something in the engine,
  change the engine."

  :)



PS:  Sorry about being over-sensitive about the "trolling" thing. I've 
known you for enough years that I should have been able to expect 
nothing more than good humor from you.  I'd just had a complicated 
morning; thank you for replying so gracefully.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for Desktop, Mobile, and Web
  ____________________________________________________________
  Ambassador at FourthWorld.com        http://www.FourthWorld.com





More information about the Use-livecode mailing list