ReadLine troubles…

I use a Text file to populate a window contents and on macOS all is correct.

In that window, I have some TextFields (OK), one Listbox (nok), another TextField (OK) and a TextArea (OK).

I Populate (with ReadLines) the first set of TextFields and this is OK.
Then, it is the moment to populate the Listbox.
When the ReadLine returns an empty line, it is the signal to exit the reading loop and populate the next TextField.

All of these works fine under macOS, but not under Windows.

Ideas ?

In the mean time, I will test a new way to create the source text file (export the data from that Window into a Text file and check how the import goes (to avoid EndOfLine potential troubles)

It seems that TextEdit (the Apple software) generate .txt files with wrong (?) line ending (ASCII 13 or ?).

I generated a text file using with my application using EndOfLine to separate the fields and once the file sent to Windows, I was able to import it into my window interface under Windows.

There is crapware everywhere ! :frowning:

Or developers who are not aware of system differences and their IDE’s capability to handle them.
String — Xojo documentation (without string for API 1)
EndOfLine.Macintosh — Xojo documentation.

Replaces the line endings in the passed String with the specified line ending.

So, I have to read the text file, use the above, then start the process I actually use… very efficient.

What for ? I saved the data using an Apple software and get troubles on Windows.

Also:

This property has been deprecated. There is no replacement for this property.

And I do not talk about the RTF support in Xojo who do not recognize what Apple’s TextEdit generate (pure rtf, no rtfd files).

Fortunately, I built a window to allow me to save the data in a format Xojo knows (same applied for RTF files years ago).

At last, I do not want to be discourteous, I will not talk about 2019r2.

Can you recall me who wrote “Write Once and Deploy Everywhere ?”

[quote=460361:@Emile Schwarz]This property has been deprecated.
There is no replacement for this property.[/quote]
Right you should use EndOfLine.Unix. If you don’t, your text files may not open correctly in other apps on macOS.

What if:

stringLine = myStream.ReadLine().ReplaceLineEndings("") // remove garbage line ending from other OS