repeat loop and formatting question
Robert Brenstein
rjb at robelko.com
Tue Nov 18 06:00:28 EST 2008
On 17/11/08 at 19:20 -0800 Mark Swindell apparently wrote:
>Yes, this is a much more efficient direction to take things. Given
>over 90 different digraphs and blends, it's a lot less code than I
>was using.
>
> Thanks.
>Mark
>
If you have that many, it may be worth to have a config page with a
table which has the marking in one column and a list of affected
digraphs in the other. Comments could be in the third column. I mean
entries line:
b tab ck ch tab -- bolds
u tab ch oo tab -- underlines
Then, you could replace
>put "ck ch" into vChunksToMark["b"] -- bolds
>put "ch oo" into vChunksToMark["u"] -- underlines
with
get field "digraphMarking" of cd "settings"
set the itemDelimiter to tab
repeat for each line i in it
put item 2 of i into vChunksToMark[item 1 of i]
end repeat
so you can control markings without direct changes in script.
Robert
More information about the use-livecode
mailing list