Amazing how forgiving the older LC engines are...
paul at researchware.com
Mon Nov 11 09:00:53 EST 2019
I just got bit by how forgiving older LC engines version are.
Migrating a stack from LC6.7.11 to LC9.5.1. There is a handle to perform
a "select all" on a particular list field where "select all" means
select all lines but the first. The code was essentially:
put empty into tLineList
repeat with i=2 to the number of lines in fld 1
put i & cr after tLineList
delete last char of tLineList
set the hilitedLines of fld 1 to tLineList'
This throws an script execution error under LC9.0.5 or 9.5.1 when trying
to execute the last line, but works perfectly well under LC6.7.11 and
The problem, of course, is that the hilitedLines is supposed to be a
COMMA delimited list, not a CR delimited list. Even the LC6.7.11
Dictionary states comma delimited. And yet, LC6.7.11 and earlier happily
allowed and handled correctly wither comma or cr delimited lists for the
Simple change of Cr to comma fixes the routine for LC9xx
I am not sure in what more recent LC versions this list flexibility went
away (7? 8? 9?) but I have mixed feelings that it did go away. On one
hand, I think the versatility of the older engine in forgiving and
working with bad syntax was amazing. On the other had, had they been
stricter, I would have discovered this bug long ago.
More information about the use-livecode