local variable being reset from outside of script
Dr. Hawkins
dochawk at gmail.com
Fri Jun 19 12:02:13 EDT 2015
In the script of a behavior button for a field, I have a block of
*if* pChFld is empty *then*
*breakpoint*
*end* *if*
*palette* chStk
*if* pChFld is empty *then*
*breakpoint*
*end* *if*
where pChFld is declared local outside of and before any handler. This is
also the only script anywhere with a pChFld. pChFld contains an id for a
field in chStk, and strict compilation is on
Supposedly, pChFld will be persistent under such circumstances.
Somehow, between the two checks, pChFld changes from holding an id to empty.
I have single stepped through the palette statement; there is nothing there.
I have tried changing pChFld to a global; no difference.
I've wrapped the palette statement with a lock messages/unlock messages, no
effect.
If I single-step through in the IDE, though, it all works, and pChFld .
For that matter, if I put an evil red dot on the first if in this block,
and then let the debugger run from there without single-stepping, it works.
I'm seeing this in 7.0.5 & 7.0.6-rc1 on yosemite
Have I hit an ugly bug, or am I missing something?
--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
More information about the use-livecode
mailing list