Help, what am I doing wrong???

Mark Wieder mwieder at ahsoftware.net
Sat Jul 30 22:15:00 EDT 2005


Dennis-

Saturday, July 30, 2005, 12:13:06 PM, you wrote:

DB>  >>  Important!  You cannot change the labelVariable in a statement
DB> inside the loop. Doing so will cause a script error..."

DB> Well I never got that script error message!

Well, it's not exactly an error "message"... it *will* cause a script
"error", in the sense that your script will not do what you expect it
to do. This has tripped me up more times than several. I now try
really hard to remember to make a copy of the labelVariable and work
with that.

I would prefer it if the engine handed a copy of the loop variable to
the script and worked with its own immutable version internally, but
I'm not sure that would be any less confusing. You'd still have to
remember that you were working with a copy.

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list