WebCore Demos on Sydney compiler warnings and Error

Hi,

I have recently installed Delphi 10.4 and the corresponding version of TMS Business and WebCore.

Opening your Music demo, as supplied with Delphi 10.4 Sydney version, I get the following various errors/warnings.

For example : In the unit App.Config;
var
Conn: TXDataWebConnection;
begin
Conn := TXDataWebConnection.Create(nil);
try
Conn.SendRequest(THttpRequest.Create('config/config.json'), @OnSuccess, @OnError);
finally
Conn.Free;
end;
end;

The following two Error are reported on the line Conn.SendRequest(THttpRequest.Create('config/config.json'), @OnSuccess, @OnError)

image

Please tell me what I am missing and advise how to proceed.

Thank you

We cannot reproduce this issue here. Are you trying to compile the project XDataMusicWeb, inside folder Demo\XData\music?
Is it possible you had a previous version installed and somehow you are using old files (from either the demo or WEB Core)?

Hi,
Thank you for getting back to me.
I am opening the demo code inside the folder ...TMS WEB Core RSXE13/Demos ... this was included when I installed the TMS WEB components for Delphi 10.4.2 Sydney.

Any Code that references procedures in the following manner show ! error at design-time, but successfully compile.

The sample below successfully compiles despite the design time warning.

Removing the @ clears the design-time warning, but does not compile.

Is this an issue with Delphi 10.4.2 ?
Must I change a setting ?

This is due to a difference between the DCC32 compiler that is used at design-time and the pas2js compiler that is used to compile. Sadly, we do not see much obvious or straightforward we can do to overcome this difference between 2 compilers.
If you do not want to see this design-time warning, include this line of code in a condiftional define block
{$IFDEF PAS2JS}
....
{$ENDIF}