Dr.-

Saturday, April 20, 2013, 4:40:56 PM, you wrote:

> I have a recurring problem that a variable name was apparently called
> global *somewhere* in my multitude of scripts (hundreds?).

> I then declare it local elsewhere, and strict compilation throws a
> tizzy, blocking everything, even though it isn't available in the
> local scope.

> Is there *any* way to find out the offending other variable when
> "local name shadows" ??

That's what strict compilation is supposed to do :-P A variable, once
it's used, *is* available in the "local" scope. It's always in memory
until it's deleted. So locally you could pop up the message box, type
"global yournamehere;delete yournamehere" and then compile your
script. But that would only be a temporary fix because you'd still
have a var name conflict.

What are you trying to accomplish? Use the variable name as a local
var and *not* as a global one?

It's a good idea to usse a naming convention and start your global var
names with a "g" prefix and *never* start local var names with "g"
(use a different prefix for local vars). Then you won't run into this
kind of conflict.

But anyway, in the script editor type control-F, then click the More
button that appears at the bottom. Change the scope to Stack Files and
you'll get a list of everwhere that var name is used.

-- 
-Mark Wieder
 mwie...@ahsoftware.net


_______________________________________________
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