Bug in "last" keyword?
Posted: Fri Dec 30, 2011 8:40 pm
I found this in the user comments in the dictionary under the keyword "last".
To paraphrase:
Make a field with exactly three lines, two words to each line. Now do this in a button:
on mouseup
set the textStyle of word 1 of the last line of fld "yourField" to "bold" --throws an error
-- set the textStyle of word 1 of line -1 of fld "yourField" to "bold" --works
--set the textStyle of word 1 of line 3 of fld "yourField" to "bold" --works
--put word 1 of the last line of fld "yourField" --works
end mouseup
A "do" construction on the offending line does not help.
Where is this not resolving? Or is it another example of the instability in that keyword, already documented (and lamented} in the dictionary?
Craig Newman
To paraphrase:
Make a field with exactly three lines, two words to each line. Now do this in a button:
on mouseup
set the textStyle of word 1 of the last line of fld "yourField" to "bold" --throws an error
-- set the textStyle of word 1 of line -1 of fld "yourField" to "bold" --works
--set the textStyle of word 1 of line 3 of fld "yourField" to "bold" --works
--put word 1 of the last line of fld "yourField" --works
end mouseup
A "do" construction on the offending line does not help.
Where is this not resolving? Or is it another example of the instability in that keyword, already documented (and lamented} in the dictionary?
Craig Newman