SerialPort with Xojo 2019r2

Hi guys,

I’m trying to do this tutorial:
and I face an issue due to a difference between Xojo versions.

Compiling this line :

This item SerialPort was deprecated in version 2019r2.
Please use SerialDevice as a replacement.

Compiling this line :

Type “SerialConnection” has no member named “SerialDevice”

I also tried Serial1.Device = System.SerialPort… but the compilation gives me a type mismatch.

I’m out of ideas to solve this, so any suggestion is welcome.

Best regards.

Unfortunately, you shouldn’t be using 2019r2. You really need to upgrade to 2019r3 if you want to use API 2.0.

Aside from r2 already being discontinued (for lack of a better word), r3 includes several fixes for these “type mismatch” errors and warnings that appeared in the transition to API 2.0, including a change back to the original Event names.

I hope that helps. Good luck.

ignore 19r2 and above for serial, 19r1 and below are perfect using API 1.
for some unknown reason serial was changed in API2, no reason has been given, it is perfect in all previous versions using API 1.
download 19r1.1, use the examples included in that download, it will work properly.

I did not intend it, but although k would like it, I cannot even upgrade to r3 since I am tied to the serial-control. That’s what’s stated here.

In r2 and above serialPort changed to SerialDevice and serial changed to SerialConnection.

To get serialdevices:

Hi guys, thanks for your feedback.

I had this issue with 2019r2.1 and basically I went back to the 2017r2.1 (the version used in the tutorial I followed) to get the job done.

All running well now.

Any idea if a solution will be provided for the next versions?

if you have it working now in the version you are running I am sure there is nothing that will be improved by changing to the methodology of the newer version, it can not make it ‘better’, it will change the keywords and error handling.
is it an ‘upgrade’ mmmmmm
no reason for me to change long standing code for no reason, depreciated is not removed, I suspect the 17r2.1 code you have will still work fine in 27r2.1.