Eureka: Going multi-platform

I have a Windows 10 / macOS project (not tested on Linux) with a bug in display: I get only one line instead of many.

In my window, I have a bunch of TextFields… and a ListBox. The ListBox contents is stored in a single field in the DB Record.

At next Record read time, the code read the field contents, then displatch it into the ListBox (using EndOfLine as line delimiter).

On macOS (El Capitan), all works as expected, but not on Windows 10 1909. The things goes like that since Natale. Early this afternoon, wanted a screen shot and falled into the trap. I managed to get my screen shot, then I take some times to think at how to squash the bug.

I finally think at ReplaceLineEndings, take some minutes to find where to put it, then added it to my line of code that retrieve the field contents:

Contenu = ReplaceLineEndings(rs.Field("Issue_Contents").StringValue, EndOfLine)

This works fine, as expected. THe harder thing was to think at how to resolve the problem.

So, FWIW, if you have a problem displaying lines in a multi platform project (and data base, but not only), remember to use ReplaceLineEndings.

Take care.