Clearing spaces from lines of a field
David Squance
squance at elkvalley.net
Wed Jan 14 22:01:17 EST 2004
In the process of trying to build a "cleaning script" I tried the following:
Type a few short lines (with returns) in a field. After line 1 add a few
spaces. Clicking in the empty space to the right of the visible characters
leaves the cursor the expected distance from the last visible letter.
Using the delete key removes the spaces as expected and similar clicking
leaves the cursor beside the last letter. However:
In the multiple line message box, I put:
repeat
if last char of line 1 of fld "theField" is " " then
delete last char of line 1 of fld "theField"
else exit repeat
end repeat
put line 1 of fld "theField"&"<"
which produces:
the text<
Then in the single line message box, I put:
put ">"&( line 1 of fld "theField")&"<"
which produces:
>the text <
I went back and forth a few times, and it made no difference. I can still
click beside the line of text and have the cursor stay out the distance of
the added spaces. Any clues as to what is going on?
Dave
More information about the use-livecode
mailing list