Jump to content

tDialogService.MessageDialog with ACloseDialogProc / need synchronize or not?

Recommended Posts

Do i need to synchronize here:


FMX.Dialogservice.TDialogService.MessageDialog(mxappform._('Bestätigen?'), tmsgdlgtype.mtConfirmation, [TMsgDlgBtn.mbYes, TMsgDlgBtn.mbNo], tmsgdlgbtn.mbNo, 0,
procedure(const AResult: TModalResult)
	if aResult=mrYes then begin
		tThread.Synchronize(nil, procedure begin
        	// do something on GUI


Share this post

Link to post

I tried with both TDialogService.TPreferredMode.Async and Sync and I see the same main thread in the procedure.

So, no synchronize needed.

  • Thanks 1

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now