Re: [Lazarus] Bug 15390 and Showmodal

2012-04-19 Thread Felipe Monteiro de Carvalho
2012/4/18 zeljko zel...@holobit.net: As I said (my opinion): if Delphi behaviour is to leave app stucked into modal loop when form is hidden - it's wrong. Current implementation is fine and works fine on all platforms I can test. . Maybe I will implement it to be delphi compat but

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread Hans-Peter Diettrich
patspiper schrieb: No, FormClose() isn't called when modal form is hidden via Hide(); Correct , so form still exists and it can be called with ShowModal() or Show() again. I beg to differ here as Showmodal should not exit unless the modal form is closed. A modal form (dialog) can be

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread Martin
On 18/04/2012 11:53, Hans-Peter Diettrich wrote: patspiper schrieb: No, FormClose() isn't called when modal form is hidden via Hide(); Correct , so form still exists and it can be called with ShowModal() or Show() again. I beg to differ here as Showmodal should not exit unless the modal

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread zeljko
On Wednesday 18 of April 2012 15:22:27 Martin wrote: On 18/04/2012 11:53, Hans-Peter Diettrich wrote: patspiper schrieb: No, FormClose() isn't called when modal form is hidden via Hide(); Correct , so form still exists and it can be called with ShowModal() or Show() again. I

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread Martin
On 18/04/2012 15:27, zeljko wrote: In LCL there is Screen.DisableForms() +1 , that's why I implemented hiding of modal form as it is - it simply works on all platforms, and Delphi behaviour looks pretty unlogical to me (but even that can work - see my today patches attached at issue).

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread William Oliveira Ferreira
2012/4/17 zeljko zel...@holobit.net ** On Tuesday 17 of April 2012 17:41:54 patspiper wrote: This is related to bug #15390: My understanding is that Showmodal blocks until the form is closed. Hiding the form should have no effect. try Self.Hide; Form2.ShowModal; //-

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread patspiper
On 18/04/12 16:22, Martin wrote: On 18/04/2012 11:53, Hans-Peter Diettrich wrote: patspiper schrieb: No, FormClose() isn't called when modal form is hidden via Hide(); Correct , so form still exists and it can be called with ShowModal() or Show() again. I beg to differ here as

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread patspiper
On 18/04/12 17:27, zeljko wrote: On Wednesday 18 of April 2012 15:22:27 Martin wrote: On 18/04/2012 11:53, Hans-Peter Diettrich wrote: patspiper schrieb: No, FormClose() isn't called when modal form is hidden via Hide(); Correct , so form still exists and it can be called

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread patspiper
On 18/04/12 17:39, Martin wrote: On 18/04/2012 15:27, zeljko wrote: In LCL there is Screen.DisableForms() +1 , that's why I implemented hiding of modal form as it is - it simply works on all platforms, and Delphi behaviour looks pretty unlogical to me (but even that can work - see my

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread Martin
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

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread patspiper
On 18/04/12 20:09, Martin wrote: 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

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread zeljko
On Wednesday 18 of April 2012 16:39:59 Martin wrote: On 18/04/2012 15:27, zeljko wrote: In LCL there is Screen.DisableForms() +1 , that's why I implemented hiding of modal form as it is - it simply works on all platforms, and Delphi behaviour looks pretty unlogical to me (but

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread zeljko
On Wednesday 18 of April 2012 16:47:43 William Oliveira Ferreira wrote: 2012/4/17 zeljko zel...@holobit.net ** On Tuesday 17 of April 2012 17:41:54 patspiper wrote: This is related to bug #15390: My understanding is that Showmodal blocks until the form is closed.

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread zeljko
On Wednesday 18 of April 2012 20:05:35 patspiper wrote: On 18/04/12 20:09, Martin wrote: 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

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread Martin
On 18/04/2012 19:05, patspiper wrote: Furthermore, Hide() does not trigger the OnCloseQuery and OnClose events. Yes. But that are side effects. The actual action on the widget / handle (the window as known by the win-api or gtk) are the same: The form (window widget) is taken of the screen

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread Martin
On 18/04/2012 19:26, zeljko wrote: On Wednesday 18 of April 2012 20:05:35 patspiper wrote: On 18/04/12 20:09, Martin wrote: 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

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread patspiper
On 18/04/12 21:26, zeljko wrote: Maybe I will implement it to be delphi compat but first must test it on all platforms. Also I would like to have property inside TCustomForm which can change behaviour of ShowModal() when Hide() is called. 1.I like current implementation because you can

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread patspiper
On 18/04/12 21:56, Martin wrote: On 18/04/2012 19:05, patspiper wrote: Furthermore, Hide() does not trigger the OnCloseQuery and OnClose events. Yes. But that are side effects. The actual action on the widget / handle (the window as known by the win-api or gtk) are the same: The form

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread patspiper
On 18/04/12 22:01, Martin wrote: On 18/04/2012 19:26, zeljko wrote: On Wednesday 18 of April 2012 20:05:35 patspiper wrote: On 18/04/12 20:09, Martin wrote: 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

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-18 Thread zeljko
On Wednesday 18 of April 2012 21:01:39 Martin wrote: On 18/04/2012 19:26, zeljko wrote: On Wednesday 18 of April 2012 20:05:35 patspiper wrote: On 18/04/12 20:09, Martin wrote: On 18/04/2012 17:53, patspiper wrote: On 18/04/12 17:39, Martin wrote: But this is not a bug.

[Lazarus] Bug 15390 and Showmodal

2012-04-17 Thread patspiper
This is related to bug #15390: My understanding is that Showmodal blocks until the form is closed. Hiding the form should have no effect. try Self.Hide; Form2.ShowModal; //- this should block until Form2 is closed finally Self.Show; // - this should not be reached until Form2

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-17 Thread zeljko
On Tuesday 17 of April 2012 17:41:54 patspiper wrote: This is related to bug #15390: My understanding is that Showmodal blocks until the form is closed. Hiding the form should have no effect. try Self.Hide; Form2.ShowModal; //- this should block until Form2 is closed So,

Re: [Lazarus] Bug 15390 and Showmodal

2012-04-17 Thread patspiper
On 17/04/12 21:19, zeljko wrote: On Tuesday 17 of April 2012 17:41:54 patspiper wrote: This is related to bug #15390: My understanding is that Showmodal blocks until the form is closed. Hiding the form should have no effect. try Self.Hide; Form2.ShowModal; //- this should block