This has cropped up a few times over the last few months but I usually fix it by renaming the "offending" variable.
Usually restarting livecode does not seem to work.
Today I had the error crop up - on code that worked last night and I was just debugging - I did not add any new variable.
I have strict compilation on
I have 4 smallish routines that use the same LOCAL variable lnItem, lnRowPos, lcButton
I renamed the lnItem to lnKeyNum (just in case there is some bad Hashing going on in the Core - I don't think so but Straws are pretty hard to Clutch).
It went to the next routine and said lcButton was shadowing - so I replace all in the stack. So next it went to the other routine and decided It didn't like a different Variable so I thought (OK I swore like a trooper)
I removed strict compilation on and yes it compiled. Put it back on - same thing.
So I thioght I'd do some testing before I started whining.
Code: Select all
Local lnItem, lnRowPos, lnKeyNum, lnX
Local lnMenu
Code: Select all
Local lnRowPos, lnItem, lnKeyNum, lnX
Local lnMenu
The compilation fails at lnRowPos if I switch them back it fails on lnItem again. I also added a new variable (fred) and it still fails on the previous one it did before.
I am loath to go to non Strict compilation (Pascal does that to you) but Ive been declaring my variable with Foxpro and Clipper for the best part of 25 years
Can someone please explain a foolproof way of sorting this or if you are litening O Great Ones at RunRev Towers - Sort it out please!- there is a 2013 thread with this same problem but at least exiting and starting again works - this is getting worse now. Nothing like a bug that is enhanced with time ....Old Habits Die Hard
How about a preferences "refresh" variables if you haven't got the time to fix "Non important Bugs"
<EndOfRant>
Regards Lagi