Nesting procedure for ShowDialog.

Trying to use this but the IDE complains No overloaded function for 'ShowDialog' that can be called with these arguments.

MsgDlg.ShowDialog('Clear all chat messages?', WEBLib.Dialogs.mtConfirmation, [mbYes, mbNo],
procedure (mr: TModalResult)
begin
if mr = mrYes then
WebChatBox.Messages.Clear;
end
);

Also this gets a compile error about wanting a TJSPromise got long int.

mr := TAwait.ExecP(MsgDlg.ShowDialog('No video devices found. Please plug in camera.', WEBLib.Dialogs.mtConfirmation, [mbOk], nil));

This compiles and works. But the IDE complains of syntax errors

  mr := await(TModalResult, VideoRecDlg.ShowDialog('Please enter screen record name or press Cancel:', WEBLib.Dialogs.mtConfirmation,[mbOK, mbCancel]));

What would be the best way to call this without passing the @function to the call.

We have tried the first method, it compiles here in a new blank TMS WEB Core Project. Did you try one of our demos? For example, in Basic/ResponsiveGrid demo there is a showdialog example

Thanks. I will check it out. Was able to sue the MessageDlgAsync with the TAwait. IDE does not complain and compiles.