What does 'shadows' mean?

Jim Ault jimaultwins at yahoo.com
Mon Oct 10 12:55:14 CDT 2011


On Oct 10, 2011, at 11:26 AM, Ralph DiMola wrote:

> I have had this problem in the past and still do now and again. It  
> seems to
> rear its ugly head when doing a lot of variable adding/deleting/ 
> renaming
> during development, but I have not been able to identify the exact
> circumstances to reproduce. I am running on the IDE on XP. Sometimes  
> closing
> LC will fix it, other times the only way I found to fix it was to  
> rename the
> variable. I think this is a bug.


If you inspect the Variable Watcher window in debug mode at the top of  
each handler,
you should see a double entry when a shadow condition is true.  Place  
a debug checkpoint at the top of each handler.

By stepping through you could determine the exact line that creates  
the condition, as well as follow the handler calls that show locals  
and globals.

My naming convention is
globals start with 'z' so that they all list at the bottom of VWatcher
script locals start with 'x' so they are all listed above the globals
then locals, params, loop vars have 'normal' names and appear in the  
top section.

As an additional note, you can view all of the globals you have  
created by simply viewing 'Variables' without being in debugging mode.

Hope this helps.

Jim Ault


More information about the use-livecode mailing list