Page 1 of 1

Broken in Delphi XE?

Posted: Mon 24 Jul 2017 04:03
by corneliusd
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.

Re: Broken in Delphi XE?

Posted: Mon 24 Jul 2017 09:12
by ViktorV
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.

Re: Broken in Delphi XE?

Posted: Mon 24 Jul 2017 13:32
by corneliusd
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.

Re: Broken in Delphi XE?

Posted: Mon 24 Jul 2017 13:42
by ViktorV
Thank you for being interested in our products.
Feel free to contact us if you have any further questions about our products.