Somewhere earlier (I'm not sure where) I asked for RealBASIC code to modify plain text WITHOUT WORD WRAP to plain text WITH WORD WRAP. This post is a "progress report" on what I've written myself thus far.

It's not perfect and it has some limitations (some of which can be solved with more complex code, some not), but -- if you willing to modify the text by hand so that there's a BLANK LINE at the beginning (and/or end) of each PARAGRAPH -- the following code may be helpful:

The "WXYZED," can, of course, be any nonsense text unlikely to appear in the text you are working with. (If you are working with Linux or a MAC, you will probably have to modify the code accordingly. I'm assumed a Windows editfield.)

I find even this inadequate code to be useful. (I actually start with RTF files rather than plain texts, but that's easily taken care of by copying the text to a control that accepts only plain text.) I hope some other people may find it to be useful as well.

Thanks for the suggestions. I should have mentioned, however, that I'm working with Windows (whereas both your site and Joe Strout's site are Mac-oriented).

For example, Windows 7 doesn't seem to know what to do with the .sit.hqx files on Joe Strout's site (it doesn't even seem to want to unpack properly the .zip files there <sigh>) and I wasn't sure where to find the relevant files on your site.

Any advice?

Barry Traver

P.S. I don't think there is anything Mac-specific (or Linux-specific, for that matter) with the code I posted. As far as I know, it should work with all three platforms.

I am not sure I am not sure I am considering all the intricacies here but, couldn't you use a different separator for paragraphs (insert it when enter is pressed), like a second CR/EndOfLine for example?

Then, before saving, replace the double CRs by a keyword that you consider "impossible" to have a text, remove all remaining CRs, and finally put back the single CRs where you had two of them initially, by replacing your keyword.

Wouldn't that work?

Pixe_____

Posted now by me:

pixe656 is a couple of months ahead of me. The question asked is ,"Wouldn't that work"? (See above.) Yes, it definitely would work, and it's the method I described earlier in this thread, but pixe656 came up with the method first (including (1) the two EndOfLines as a separator, which is equivalent to inserting a blank line between paragraphs, and (2) using an "impossible" keyword, where I used "WXYZED").

I apologize for not giving pixe656 credit earlier, but although I had forgotten the note posted in November 2012, my subconscious apparently remembered enough of the contents to lead me to that same approach.

Since there is not already anything in the original text I am working with to definitively set off paragraphs, something has to be added for that purpose, and inserting blank lines or two EndOfLines is the easiest way to do that.

Thanks for the URL. I'm not there, but I'm getting closer. I successfully downloaded and unpacked the files. I still have some problems, however.

When I load in M_STRING HARNESS.rbp, I get this message:

"This project was saved with a newer version of Real Studio (version 2012.02) Real Studio will convert your project to work with this version (version 2012.012). This could result in data loss should you choose to save your project."