TWebListControl.OnGetItemChildren(Sender, AItem, AElement): AElement never assigned / consumed...

When the RenderList-method of TWebListControl gets called, I think there's a problem:

      el := TJSHTMLElement(li);

      GetItemChildren(Items[i], el);

      AElement.appendChild(li);

The GetItemChildren-method doesn't consume the "el"-parameter:

procedure TListControl.GetItemChildren(Item: TListItem; AElement: TJSHTMLElement);
var
  LElementRec: TJSHTMLElementRecord;
begin
  if Assigned(OnGetItemChildren) then
    OnGetItemChildren(Self, Item, LElementRec);
end;

So, what is the purpose of "LElementRec" in the event ?

You're correct about this oversight.
We have corrected this to:

procedure TListControl.GetItemChildren(Item: TListItem;
  AElement: TJSHTMLElement);
var
  LElementRec: TJSHTMLElementRecord;
begin
  LElementRec.element := AElement;
  if Assigned(OnGetItemChildren) then
    OnGetItemChildren(Self, Item, LElementRec);
end;

The next update will have this improvement.

Can I change and recompile it myself already?
How to recompile?

You need to apply this change in "Core Source\WebLib.ListControl".
No need to recompile for design-time, this change affects run-time only.

That's what I thought, but initially the change in sourcecode didn't seem to propagate in the debug-console of my browser.
The problem was: I have Delphi 10.3 and 10.4 on the same machine.
I changed the sourcecode in ..\TMS WEB Core RSXE13\Core Source but the files from ..\TMS WEB Core RSXE12\Core Source were used.
Looking at the Options of TMS Web in 10.4 showed the problem. All the references in 10.4 referred to the RSXE12 directory.
Changing it solved the problem, but maybe this can be a fix in the next release to properly install TMS Web when installing on a system with more than one delphi-installation...

Thanks for the fast respons.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.