0

I have an application with the old version for Delphi 7 and when I try to migrate to Delphi 10 Seattle several problems occur, how can I solve it? Could you help me, please?

The errors shown on the screen are attached

image

image

image

image

image

Example error code with comport 4.11:

Comport1.FlowControl.DTR := TDTRControl(GetEnumValue(TypeInfo(TDTRControl), Balanca.DTR.Valor));
Comport1.FlowControl.RTS := TRTSControl(GetEnumValue(TypeInfo(TRTSControl), Balanca.RTS.Valor));
Comport1.FlowControl.XOnXOff := TXOnXOffControl(GetEnumValue(TypeInfo(TXOnXOffControl), Balanca.XOnXOff.Valor));
Comport1.Options := PegaOpcoesBalanca(Balanca.OPTIONS.Valor);

I'm trying to migrate the comport 3.2 component (delphi 7) to comport 4.11 (delphi 10 seattle). There are many different properties and I'm not able to adjust.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • Not related to your errors, but on a side note, you don't need to use `GetEnumValue()` the way you are. You can simply typecast an integer directly to an enum, eg: `Comport1.FlowControl.DTR := TDTRControl(Balanca.DTR.Valor);` – Remy Lebeau Jan 10 '23 at 15:35

0 Answers0