Line numbers for soft-wrapped styled text?
Richard Gaskin
ambassador at fourthworld.com
Mon Mar 27 12:50:09 EDT 2017
Bob Sneidar wrote:
> Yeah I was thinking the same thing. textChanged triggers a handler
> that reformats the text every time. In essence, you are doing what
> a word processor would do.
The textChanged message is only sent when changes are made to the text
of a field. Changes to styling attributes may also affect line heights
and wrapping (e,g, bold will increase text width, textSize will enlarge
it overall), and those changes are beyond the scope of triggers for the
textChanged message.
That said, I don't believe there are any messages for style changes, so
I agree a frontScript here trapping multiple message should not be
needed/useful.
AFAIK the only way to account for styling changes is either in the
scripts for the UI elements that enact them (which is what I'm using
now) or polling (which I generally try to avoid unless I have no other
way to solve a problem).
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list