[Lazarus] Default caption in MessageDlg()

Vincent Snijders vsnijders at vodafonevast.nl
Fri Oct 31 20:16:01 CET 2008


Bart schreef:
> I just noticed that if I do a
> 
>   MessageDlg('Some ErrorMessage', mtError, [mbOk], 0) ;
> 
> (so I do not specify a custom caption for the dialog) then the caption
> of the dialog is the Application.Title, whereas in Delphi (at least in
> D1 to D3) it depends on the DialogType, so in Delphi the caption of
> the dialog in my example would be  "Error"
> 
> I just tested an existing executable, compiled with a previous version
> of Lazarus, and this code:
> 
>     MessageDlg(Format(msgSourceDirNotFound,
>                        [ExcludeTrailingPathDelimiter(SourceEdit.Text)]),
>                        mtError, [mbOk], 0);
> 
> will bring up a Dialog with "Error" as the caption.
> 
> I'm using Lazarus from SVN revision 16824.
> 
> Is this new behaviour by design (which would force me to rewrite
> almost all my projects to use the MessageDlg(aMsg, aTitle, DlgType,
> Buttons, HelpCtx) format instead), or is it a bug?

This was changed 2007-06-13 11:34 vincents r11317.

I cannot find the exact reason for the change. I have no objection to 
revert it.

Vincent



More information about the Lazarus mailing list