Bug in "last" keyword?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Bug in "last" keyword?

Post by dunbarx » 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

Post Reply