Using 'for each' to modify a container

Scott Rossi scott at tactilemedia.com
Thu Oct 12 03:15:47 EDT 2006


>> Using Variable Watcher and some test variables, I saw 'LNN' change
>> the way you would expect, then later, strangely, it held some garbage
>> characters, and thus the bug(s).  The failure was not always the same, but it
>> did fail before the end of the process.  By not reusing LNN each time, the
>> problem has not returned.

FWIW, I ran into a similar issue some time ago: garbage characters randomly
appearing in a variable.  Took me weeks of messing around with complex code
since I couldn't get simple tests to fail.  Eventually I determined the
problem was "contrived" object references.  I was manually creating object
references like "btn 1 of stack coolstack" which for some reason was
intermittently failing and being stored as garbage.  Once I started
referencing objects using their long IDs, the problem disappeared.

Chalk this up as another "...might save someone else a few headaches...".

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com





More information about the use-livecode mailing list