LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
on mouseup
answer the clickline -- it works
set the textstyle of me to plain
end mouseup
------------------------
on mouseup
set the textstyle of me to plain
answer the clickline -- it does not work
end mouseup
The clickLine function is cleared at the next mouse click, as well as after some editing actions such as deleting text. If the last click was not in a field, the clickLine function returns empty.
setting the textStyle of a field is apparently one of the editing actions. You force a rebuild of the field.
This is why one should ALWAYS put the results of these functions, as well as anything that loads the local variable "it", into another variable RIGHT AWAY.
And this is coming from someone who is sloppy in that regard, and has to go back now and then and fix stuff instead of doing it right the first time.