Name shadows another variable error

Ralph DiMola rdimola at evergreeninfo.net
Thu Nov 14 18:02:17 CET 2013


I too see it happening with other than globals. I don't have a recipe but
locals in/out of a specific hander in the same tab can also cause this. When
and where? Can't nail that one down yet. I thought that my reproducible
recipe might point to an ah-ha light bulb moment. One can only wish.....

Note: I have never seen this across object scripts. It's always in just one
tab (for me anyway).

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: Thursday, November 14, 2013 11:06 AM
To: How to use LiveCode
Subject: Re: Name shadows another variable error

Glad we're starting to home in on this longstanding issue.

Seems that Malte's recipe reproduces the problem but I see it happening in
different circumstances, not involving globals.

In my case,  a variable with the same name is defined in one or more
handlers in the scripts of several different objects,  all of which are open
in the script editor. Most of the time,  this doesn't cause a problem but
then an apply on one of the scripts suddenly throws the error.

Monte - maybe your fix handles that too?

Pete
lcSQL Software
On Nov 14, 2013 12:35 AM, "Malte Brill" <revolution at derbrill.de> wrote:

> Hi all,
>
> the easiest way for me to trigger the shadow Bug, is to change the 
> scope of the variable from global to local
>
> in a card script:
>
> global tBoo
>
> on openCard
>   put "moo" into tBoo
> end openCard
>
> hit apply, change script to
>
> on openCard
>   local tBoo
>   put "moo" into tBoo
> end openCard
>
> hit apply.
>
> Cheers,
>
> Malte
>
>
>
> _______________________________________________
> 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
>
_______________________________________________
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