> On Thu, 13 Mar 2014 22:45:44 +1030 > Steve Gatenby <[email protected]> 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 form >> name). >> But the form closes anyway. >> >> procedure MyFormCloseQuery(Sender: TObject; var CanClose: boolean); > > Methods have a hidden Self parameter: > > procedure MyFormCloseQuery(Self: TObject; Sender: TObject; var > CanClose: boolean); > > Keep in mind that this is an implementation detail of the compiler, > which may be different on other platforms, may not work with special > compiler flags and may change in future. > > Mattias > > -- > _______________________________________________ > Lazarus mailing list > [email protected] > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > would there be any way to accomplish what I'm after then ? I am trying to indirectly prevent the form closing (by passing the Form to a Method / Proc) So with no additions to the original forms class or instance.
Thanks -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
