[Lazarus] Inconsistent results from MessageDlg()

Bart bartjunk64 at gmail.com
Sat Apr 28 09:57:44 CEST 2012


On 4/27/12, patspiper <patspiper at gmail.com> wrote:


> Lazarus doesn't have to bear Delphi's legacy shortcomings, especially in
> such a minor issue. I prefer that mrClose, mrCancel, and mrNone each do
> what they imply they do.

And they do. Just bkClose without mrNone did not act as expected.
This is what I fixed.


> Another factor is: Should the native and LCL dialogs both behave the
> same or not?

Well, the look and feel (for the end-user) will differ of course.
In hindsight, when the Borland guys first made Delphi, it would have
been easier if they had decided to return mrCancel when user presses
Escape.

Now we carry the burden of backwards compatibility...

> Once these 2 questions are answered, it will be much easier to make an
> informed decision.

There are valid arguments for both option 1 and 2.
And, Delphi compatibility isn't the holy grale AFAIAC.
Current implementation (without my patches) however is IMHO wrong.

Let's hear from the core devels.
I'm happy to code it either way.

Bart




More information about the Lazarus mailing list