Using 'for each' to modify a container

Ken Ray kray at
Thu Oct 12 00:23:41 EDT 2006

On 10/11/06 10:21 PM, "Bill Marriott" <wjm at> wrote:

>> you can manipulate tLine to your hearts content, but not tData. tData has
>> already been examined, parsed, and put into memory in known places so
>> iteration through the loop can go lightning fast... if you attempt to
>> change
>> tData you throw a wrench in the works.
> But Ken, that's exactly what the documentation says is NOT to be done (and
> should generate a script error).

Wow... haven't gotten any script errors or any scrambled data... oh well, I
guess I'm just lucky...
> My first post assumed what you said (ok to manipulate tLine, not to
> manipulate tData), but it seems the reality is opposite. Weird, huh? :)

Actually when I reread the statement:

Important! You cannot change the labelVariable in a statement inside the
loop. Doing so will cause a script error. You can change the content of the
container, but doing so will probably produce unexpected results.

It sounds like you shouldn't maniuplate either...

Ken Ray
Sons of Thunder Software
Web site:
Email: kray at

More information about the use-livecode mailing list