Blocking returns in a locked text field

Joe Lewis Wilkins pepetoo at cox.net
Sun May 22 03:06:51 EDT 2011


Earlier I thought I had a solution for this, but I'm not happy with what I've come up with. Anyone have a simpler/better solution?

I put the following into the field's script and it works - kind of, but not until the user leaves the field:

on mouseOver
    global gTemp
    lock screen
    put me into gTemp
end mouseOver

on mouseleave
    global gTemp
    if the number of lines in the me > the number of lines in gTemp then put gTemp into me
    unlock screen
end mouseleave

This is a real kludge. There must be a better way.

Thanks everyone!

Joe Lewis Wilkins
Architect













More information about the use-livecode mailing list