On Mon, 20 Mar 2006 09:20:20 +0100 (Romance Standard Time)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>
>
> On Mon, 20 Mar 2006, Darius Blaszijk wrote:
>
> > I have found some unexpected behaviour with the storing of form data.
> >
> > I have two forms, the second form is shown from the first one (just a
> > simple show). When I change the position for instance and close the
> > second form the data is stored. It works like expected. However, when I
> > close the first form (quit the application) no data is stored for the
> > second form.
> >
> > I have looked on how to solve the problem, but I'm not really good in
> > this, hence my question. I would like to expand the TFormPropertyStorage
> > class, so data is stored on destroy (or should it be free). Proposed
> > changes are;
> >
> > - add a fhtDestroy to TFormHandlerType
> > - add a AddHandlerDestroy to TCustomForm
> > - add a destroy handler in TFormPropertyStorage.Create
> > - add a destroy method in TFormPropertyStorage
> >
> > Have I forgotten anything, or am I on the wrong track?
>
> I'm not sure that handling it in the ondestroy event is a good idea: it
> may be 'too late' at that time.
Correct.
Maybe instead TFormPropertyStorage should save, when the
Application.MainForm is closed.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives