Jane Austen's peculiarity

Richmond richmondmathewson at gmail.com
Sun Aug 9 08:46:51 EDT 2015

Call my code clunky, clumsy and slow, and that won't really fuss me:

BUT what does fuss me is why this produces NO results when it analyses a 
text imported from an RTF file, BUT does work when the text
is either manually edited or imported from a text file.

on mouseUp
    put empty into fld "COOKED"
    put 1 into KTEKST
    put 1 into KCOOK
    repeat until line KTEKST of fld "TEKST" contains "finalSolution666"
       put line KTEKST of fld "TEKST" into fld "LYNE"
       put 1 into KWERBS
       repeat until line KWERBS of fld "WERBS" contains "finalSolution666"
          put "was " & line KWERBS of fld "WERBS" into fld "FRAZE"
          if fld "LYNE" contains fld "FRAZE" then
             put fld "LYNE" into line KCOOK of fld "COOKED"
             add 1 to KCOOK
             end if
          add 1 to KWERBS
       end repeat
       add 1 to KTEKST
    end repeat
end mouseUp

This is a big Pain-in-the-bum as texts imported from Text files do NOT 
generally come into LC textFields with lineBreaks.


More information about the use-livecode mailing list