[Lazarus] Lazarus 1.6 and QuestionDLG

Ondrej Pokorny lazarus at kluug.net
Sun Dec 20 13:41:51 CET 2015


On 20.12.2015 12:52, Jürgen Hestermann wrote:
> Am 2015-12-20 um 08:06 schrieb Ondrej Pokorny:
> > I just add that you had to care for mrCancel before as well (if 
> default dialog was shown).
> > It was returned when the dialog was closed with the system close 
> button in the window caption. So the test code you sent isn't good for 
> 1.4 either.
>
> Before (with Lazarus 1.4) typing escape had the expected behaviour.
> Now (with Lazarus 1.6) the same code does nothing on escape.
> So something has changed.
>
> > Now the behavior should be consequent:
> > no 'iscancel' button defined: mrCancel is returned on ESC/close.
> > 'iscancel' defined: its modal result is always returned on ESC/close.
>
> As already written in my other mail there is no documentation of 
> 'iscancel' on
> http://wiki.freepascal.org/Dialog_Examples#QuestionDlg
> and here
> http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/questiondlg.html
> neither 'isdefault' nor 'iscancel' is mentioned.
>
> I simply did not know about 'iscancel' at all.
> How should I, if it's undocumented?

It's completely OK that you don't know it - we are trying to explain it 
to you , not to abuse you.

It's a feature from trunk added by me on Dec 13th 2015 and it is 
documented in trunk (although with some delay). I also merged it to 1.6 
branch on Dec 14th 2015. Don't get me wrong - I don't want to be 
offensive but I expect everybody asking for bug fixes to check the 
trunk/fixes_1_6 SVN changes. You cannot see the implementation details 
otherwise.

You have to understand that new features in trunk are being developed 
and so they can change. Writing a documentation for features in 
development is not very reasonable.

Always look for documentation in trunk or the fixes branch. 
http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/questiondlg.html 
isn't automatically updated and unfortunately there is no datestamp when 
it was generated. It is told to be updated with new stable versions so 
now it should reflect 1.4. Of course you don't find the latest features 
there.

I updated the wiki page accordingly.

As latest, you have the source code, so you can check it as well - that 
usually is better than any documentation.

Ondrej




More information about the Lazarus mailing list