Name shadows another variable error

Ralph DiMola rdimola at evergreeninfo.net
Thu Nov 14 00:49:41 EST 2013


OK this is one of my two LC headaches. The second is when you do a "save as"
you do a few things and then out of nowhere one gets the "another stack with
the same name"... thingy.

But I digress.

Peter,

Using 6.1.3 with Win XP SP3 I can reproduce the shadow error anomaly(bug?)
at will.

 1) Create a new main stack.
 2) Open the code editor for the stack.
 3) Put in this code.
-------------------------------
global rs1

command test1
local rs
end test1

command test2
local rs
end test2
-------------------------
 4) Click "Apply"
 5) Change the code to this
------------------------------
global rs

command test1
local rs1
end test1

command test2
local rs1
end test2
------------------------
 6) Click "Apply" and get the shadow error.
 7) Change the code back to the first snippet.
 8) Click "Apply" and get the shadow error.
 9) Close stack and remove from memory.
10) Create a new main stack.
11) Insert either of above code snippets and get the shadow error.


Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net


-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of Peter Haworth
Sent: Wednesday, November 13, 2013 8:05 PM
To: How to use LiveCode
Subject: Name shadows another variable error

I think I have just found a reliable way to reproduce the above error.
 It's not the usual circumstance it happens but it may be enough for RunRev
to track it down.  Here's what I did (by accident):

Switch Strict Compilation mode off
Create a stack with  a few controls on it Put some simple scripts in the
card, stack and/or controls, each with a local statement that names the same
variable, say tVar.
Compile all the scripts so there are no errors in them Switch Strict
Compilation Mode on Make a change in one of the scripts and compile it - you
should get the error.  If you then try to save the stack, all the scripts
that name the variable will be get a red dot in their script editor window
tab.

If anyone has a few minutes to verify this, I will submit a QCC report and
include a test stack.

Pete
lcSQL Software <http://www.lcsql.com>
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list