Broken in Delphi XE?

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
corneliusd
Posts: 24
Joined: Thu 21 Dec 2006 08:45
Location: Portland, OR
Contact:

Broken in Delphi XE?

Post by corneliusd » Mon 24 Jul 2017 04:03

I've been using the SecureBridge components in Delphi XE2 and up for quite a while and they work nicely.

I recently had need to add SFTP support to an older application that is still maintained in Delphi XE (because of a couple of major component sets it uses).

SecureBridge installs in XE, so didn't think it would be a problem. But several of the events in the ScSFTPClient component raise an error when I double-click them to create an event-handler. The error is: "Expected '>' but '.' found."

The problem is that an XE2 and newer uses dotted-namespace unit names and XE does not. For example, the handler for OnDirectoryList would be this:

Code: Select all

procedure ScSFTPClientDirectoryList(Sender: TObject; const Path: string; const Handle: TArray<System.Byte>; FileInfo: TScSFTPFileInfo; EOF: Boolean);
which works fine in XE2 but breaks in XE on the period in <System.Byte>.

Will there be an update to fix this? Is there a work-around in the meantime?

Thanks,
David.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Broken in Delphi XE?

Post by ViktorV » Mon 24 Jul 2017 09:12

The "Expected '>' but '.' found." error is a known problem of the Delphi XE compiler, and we can't influence it. As a workaround, you can change TArray<System.Byte> to TBytes or TScSFTPFileHandle and assign the event handler in code at run-time instead of assigning it at design-time.

corneliusd
Posts: 24
Joined: Thu 21 Dec 2006 08:45
Location: Portland, OR
Contact:

Re: Broken in Delphi XE?

Post by corneliusd » Mon 24 Jul 2017 13:32

I would think that the declaration for the handlers for the XE-version of the libraries could be adjusted to prevent this problem. I have not seen this problem with any other component vendor. But I'll implement them manually in code as you suggest.

Thanks.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Broken in Delphi XE?

Post by ViktorV » Mon 24 Jul 2017 13:42

Thank you for being interested in our products.
Feel free to contact us if you have any further questions about our products.

Post Reply