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
Bug in "last" keyword?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Bug in "last" keyword?
If you remove "the" it works: set the textstyle of word 1 of last line of fld "yourField" to "bold"
I suspect the engine is interpreting "the" as refering to a custom property. It's probably a bug though.
I suspect the engine is interpreting "the" as refering to a custom property. It's probably a bug though.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Bug in "last" keyword?
Jacque:
And I thought that HC was more forgiving with the optional use of "the", that LC was a bit more restrictive, requiring "the" in most cases in order to be happy. Now I find you cannot use it at all in some cases. Never occurred to me, being so skittish with LC syntax as opposed to good ol' HC.
Custom property? "the last"? Wherefore art thou, reserved words?
Happy New Year.
Craig
And I thought that HC was more forgiving with the optional use of "the", that LC was a bit more restrictive, requiring "the" in most cases in order to be happy. Now I find you cannot use it at all in some cases. Never occurred to me, being so skittish with LC syntax as opposed to good ol' HC.
Custom property? "the last"? Wherefore art thou, reserved words?
Happy New Year.
Craig
Re: Bug in "last" keyword?
It's funny, I'm fastidious about "the" in most cases: "the date", "the name", "the rect". Except I can't make myself use "the cursor", I don't know why. I cringe at "set the cursor to...", it has to be "set cursor to...".
Our brains are odd. Maybe the engine is part human.
Happy gnu ear 2 u 2.
Our brains are odd. Maybe the engine is part human.
Happy gnu ear 2 u 2.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com