TTMSFNCTaskDialog can give exception if autoclose is enabled

if autoclose is enabled, TTMSFNCTaskDialog needs the timer to be disabled before closing because timer event can fired after object is destroyed.

file fmx.TTMSFNCTaskDialog, line 2417 should be:

procedure TTMSFNCTaskDialogForm.DoResult(AModalResult: TModalResult);
begin
  if not Assigned(FTaskDialog) then
    Exit;
  if assigned (FTimer) then FTimer.Enabled:=false;
  
  if Assigned(FTaskDialog.OnDialogResult) then
    FTaskDialog.OnDialogResult(FTaskDialog, AModalResult);
end;

Hi,

Can you give us a sample that reproduces what you described so we can do some more tests?

 with TTMSFNCTaskDialog.Create(nil) do 
   try 
    Title:=tit_info; 
    Content:=AMessage;
    autoclose:=true; 
    AutoCloseTimeOut:=5000; 
    execute; 
   finally 
    free; 
  end;

and click the button

Thank you.
We applied a fix and it will be part of the next version.

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