Stripping Returns

Jerry Jensen jhj at jhj.com
Wed Nov 19 15:42:28 EST 2014


On Nov 19, 2014, at 12:14 PM, J. Landman Gay <jacque at hyperactivesw.com> wrote:

> Curiosity made me test:
> 
> on setup
>  repeat until len(tStr) > 66000
>    put any word of the colornames & space after tStr
>  end repeat
>  put last word of tStr -- for reference later
>  put tStr into fld 1
> end setup
> 
> The field is a list field with a horizontal scrollbar. I can't see the end of the line visually but the message box knows what it is.
> 
> From the message box:
> 
> put len(line 1 of fld 1) --  66004
> put len(fld 1) -- 66004
> put the last word of line 1 of fld 1 -- matches what the handler put there
> 
> Works the same for me without the spaces in the string.

Curiouser and curiouser. The code below answers 110000 65533 65533.
The field has a vertical scroll bar, unchanged from dragging it into the card. The lines wrap.
This seems to lead to a different conclusion than your test.
Curious!

on mouseUp
     local temp, accum, reload
     put "1234567890 " into temp
     repeat 10000
           put temp after accum
     end repeat
     put accum into fld 1 -- 110,000 chars
     put fld 1 into reload
     answer the length of accum && the length of fld 1 && the length of reload
end mouseUp

.Jerry





More information about the use-livecode mailing list