Re: [Lazarus] Modifying Form Event

2014-03-13 Thread steveg
> ste...@nevets.com.au schrieb: >>> On Thu, 13 Mar 2014 22:45:44 +1030 >>> Steve Gatenby wrote: >>> Hoping somebody may be able to explain why the following doesn't stop the Form closing. Button1 sets the method pointer correctly (I believe), as when closing the form the s

Re: [Lazarus] Modifying Form Event

2014-03-13 Thread Hans-Peter Diettrich
ste...@nevets.com.au schrieb: On Thu, 13 Mar 2014 22:45:44 +1030 Steve Gatenby wrote: Hoping somebody may be able to explain why the following doesn't stop the Form closing. Button1 sets the method pointer correctly (I believe), as when closing the form the showmessage occurs as expected (and

Re: [Lazarus] Modifying Form Event

2014-03-13 Thread steveg
> On Thu, 13 Mar 2014 22:45:44 +1030 > Steve Gatenby wrote: > >> Hoping somebody may be able to explain why the following doesn't stop >> the Form closing. >> >> Button1 sets the method pointer correctly (I believe), as when closing >> the form the showmessage occurs as expected (and shows the cor

Re: [Lazarus] Modifying Form Event

2014-03-13 Thread Mattias Gaertner
On Thu, 13 Mar 2014 13:51:48 +0100 Hans-Peter Diettrich wrote: >[...] > Here formMain.OnCloseQuery := @MyFormCloseQuery should be sufficient, Compiler will refuse that. >[...] > When your formMain closes anyway, I'd suggest to write an OnClose > handler and set CloseAction to caNone there. >

Re: [Lazarus] Modifying Form Event

2014-03-13 Thread Hans-Peter Diettrich
Mattias Gaertner schrieb: On Thu, 13 Mar 2014 22:45:44 +1030 Steve Gatenby wrote: Hoping somebody may be able to explain why the following doesn't stop the Form closing. Button1 sets the method pointer correctly (I believe), as when closing the form the showmessage occurs as expected (and s

Re: [Lazarus] Modifying Form Event

2014-03-13 Thread Hans-Peter Diettrich
Steve Gatenby schrieb: Hoping somebody may be able to explain why the following doesn't stop the Form closing. Button1 sets the method pointer correctly (I believe), as when closing the form the showmessage occurs as expected (and shows the correct form name). But the form closes anyway. pr

Re: [Lazarus] Modifying Form Event

2014-03-13 Thread Mattias Gaertner
On Thu, 13 Mar 2014 22:45:44 +1030 Steve Gatenby wrote: > Hoping somebody may be able to explain why the following doesn't stop > the Form closing. > > Button1 sets the method pointer correctly (I believe), as when closing > the form the showmessage occurs as expected (and shows the correct fo

[Lazarus] Modifying Form Event

2014-03-13 Thread Steve Gatenby
Hoping somebody may be able to explain why the following doesn't stop the Form closing. Button1 sets the method pointer correctly (I believe), as when closing the form the showmessage occurs as expected (and shows the correct form name). But the form closes anyway. procedure MyFormCloseQuery