Some strange Rev parsing problem?
jbv
jbv.silences at Club-Internet.fr
Thu Jan 29 05:08:00 EST 2004
Doug,
> Rev can't seem to find the object referred to in this statement:
>
> set the textStyle of word 1 to 2 of the last line of field "chatField" of
> stack "chat550" to bold
>
> But just:
>
> word 1 to 2 of the last line of field "chatField" of stack "chat550"
>
> displays just fine.
>
> Did the complexity of the statement create some sort of ambiguity that
> confused the parser?
I don't know if it's relevant, but several times I've had the
same problem with long expressions, and solved it by putting
parts of the expression into brackets, for instance :
set the textStyle of (word 1 to 2 of the last line of field "chatField" of
stack "chat550") to bold
Another problem might be that "word 1 to 2" can't be used when
setting props, only for retrieving data (get word 1 to 2 of...).
In your example, I would rather use :
repeat with i=1 to 2
set the textStyle of word i of the last line of field "chatField" of \
stack "chat550" to bold
end repeat
JB
More information about the use-livecode
mailing list