Jump to content

Question about messagedlg


flexdev

Recommended Posts

 

Hi, I encountered difficulties in using messagedlg, on some occasions it seems to not work, in particular the message is show but the callback procedure is not execute.

Example:

procedure TgenericformGrid.UniFormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
  if DSGrid.State in [dsEdit, dsInsert] then
  begin
    MessageDlg('Dati non salvati , salvo prima di uscire? '  , mtWarning, [mbOK,mbCancel],
      procedure (Sender: TComponent; Res: Integer)
      begin
        if res = mrOk then
          DSGrid.DataSet.Post;

      end
    )
  end;

end;

 

Best Regards.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...