Full justification
Jim Hurley
jhurley at infostations.com
Sun Jul 31 19:27:11 EDT 2005
>
>Message: 1
>Date: Sun, 31 Jul 2005 11:17:40 -0400
>From: Thomas McGrath III <3mcgrath at adelphia.net>
>Subject: Re: Full justification
>To: How to use Revolution <use-revolution at lists.runrev.com>
>Message-ID: <c69071b683d18421c6989de6ac6f0c7e at adelphia.net>
>Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>This will take care of the extra spaces just create another button and
>put this in it:
>
>
>on mouseUp
> repeat for each word theword in field "field"
> put theword & space after field "flush"
> end repeat
> beep
>end mouseUp
>
>Then copy the text from field "field"
>
>Tom
Tom,
Good. But to avoid the problems that Alex mentions, I was thinking of
something like the following:
on mouseUp
get the htmltext of field 1
repeat
replace " " with space in it--Replace double space with single
if offset(" ",it) is 0 then exit repeat
end repeat
set the htmltext of field 1 to it
end mouseUp
Replace is very fast. It is best to work with the htmlText to avoid
changing the formatting. (It is pretty much what I do in MS Word:
replace double spaces with single spaces until Word reports no
changes.)
Jim
More information about the use-livecode
mailing list