Name shadows another variable error

Mark Wieder mwieder at ahsoftware.net
Thu Nov 14 11:24:54 EST 2013


Malte-

Thursday, November 14, 2013, 12:35:13 AM, you wrote:

> the easiest way for me to trigger the shadow Bug, is to change
> the scope of the variable from global to local

That, I think, is a completely separate issue, and is easily
explainable.

When you compile a script with a global variable, that variable exists
in memory. Global variables have a er... global... scope, so they are
in the engine's memory space, not the stack's. You can close the stack
and the global variable still persists. So changing the script will
trigger an error because there is still a global variable by the same
name in memory. The way to get rid of the error would be to delete the
global memory before changing the script: from the messagebox

global tBoo; delete variable tBoo

and then you can change tBoo from global to local

-- 
-Mark Wieder
 ahsoftware at gmail.com





More information about the use-livecode mailing list