After moving to a new PC
and updating Delphi 12.2 to 12.2 Patch 2
and TMS WebCore 2.5.x to 2.6.1.2
I get this error:
[Fehler] Webframe.Statusanzeige.pas(110): Can't determine which overloaded function to call, D:\Programme\TMS\TMS WEB Core RSXE15\Core Source\RTL\web.pas(156,22), D:\Programme\TMS\TMS WEB Core RSXE15\Core Source\RTL\web.pas(155,22)
My call is in this function (document.querySelectorAll
):
procedure TsngStatusbar.Clear( AFrame: String);
var
i: Integer;
Status: TsngStatusbarStatus;
procedure RemoveElement( currentValue: TJSNode; currentIndex: NativeInt; list: TJSNodeList);
begin
TJSElement( currentValue).remove;
end;
begin
document.querySelectorAll( 'span[data-sng-form="'+AFrame+'"]').forEach( @RemoveElement);
for i := FStatuslist.Count-1 downto 0 do
if FStatuslist[i].Frame = AFrame then begin
Status := FStatuslist[i];
Status.Free;
FStatuslist.Delete( i);
end;
end;
The corresponding lines in Web.pas:
TJSNodeListCallBack = reference to procedure (currentValue : TJSNode; currentIndex: NativeInt; list : TJSNodeList);
TJSNodeListEvent = procedure (currentValue : TJSNode; currentIndex: NativeInt; list : TJSNodeList) of object;
TJSNodeList = class {$IFDEF PAS2JS} external name 'NodeList' {$ENDIF}(TJSObject)
Private
FLength : NativeInt; external name 'length';
Public
procedure forEach(const aCallBack : TJSNodeListCallBack);
procedure forEach(const aCallBack : TJSNodeListEvent);
function item(aIndex : NativeInt) : TJSNode;
Property length : NativeInt Read FLength;
Property Nodes [aIndex : NativeInt] : TJSNode Read item; default;
end;
Isn't there a distinction missing here with overload?
Best regards
Thomas