[Lazarus] Bug 15390 and Showmodal

Martin lazarus at mfriebe.de
Wed Apr 18 19:09:12 CEST 2012


On 18/04/2012 17:53, patspiper wrote:
> On 18/04/12 17:39, Martin wrote:
>>
>>
>> But this is not a bug.
>> And Delphi docs, IMHO are not making a 100% clear statement about this.
> It is a bug considering that both Delphi and Lazarus docs are clear 
> about it: ShowModal does not return until the form is closed.

That's not the point

The point is: Close <> Destroy
In fact, with modal active close does hide the form (and sets modal result)

In anyway it does not say "until the method close is called".
It says "form is closed" never mind how it is closed

    "closing a form" is not the same as "calling close()"

"calling close()" is only one of many ways to "close a form".
e.g during Modal, you can set ModalResult.

Depending on close the property CloseAction = caHide, a call to Close(), 
does in the end actually call Hide (or set Visible=False). The call to 
Close can (optional) destroy the form. But the actual closing is done by 
making it invisible.

So who says, that calling Hide() is not a way of closing the form?
It does the same thing. (the 2 calls have different additional side 
effects, but that is a different story)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120418/cb14b87b/attachment-0003.html>


More information about the Lazarus mailing list